Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
authormjsousa
Sun, 08 May 2016 20:01:15 +0100
changeset 1011 76175defb87b
parent 1010 242907849850
child 1012 1f2af384fb1f
Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
absyntax_utils/search_var_instance_decl.cc
absyntax_utils/search_var_instance_decl.hh
lib/C/iec_std_FB.h
lib/C/iec_std_FB_no_ENENO.h
lib/C/iec_std_functions.h
lib/C/iec_std_lib.h
main.cc
main.hh
stage1_2/iec_bison.yy
stage4/generate_c/generate_c.cc
stage4/generate_c/generate_c_base.cc
stage4/generate_c/generate_c_il.cc
stage4/generate_c/generate_c_sfc.cc
stage4/generate_c/generate_c_st.cc
--- a/absyntax_utils/search_var_instance_decl.cc	Sat May 07 21:17:49 2016 +0100
+++ b/absyntax_utils/search_var_instance_decl.cc	Sun May 08 20:01:15 2016 +0100
@@ -214,6 +214,12 @@
   return NULL;
 }
 
+/* EN : BOOL */
+void *search_var_instance_decl_c::visit(en_param_declaration_c *symbol) {
+  if (compare_identifiers(symbol->name, search_name) == 0)
+    return symbol->type_decl;
+  return NULL;
+}
 
 /* VAR [CONSTANT] var_init_decl_list END_VAR */
 /* option -> may be NULL ! */
--- a/absyntax_utils/search_var_instance_decl.hh	Sat May 07 21:17:49 2016 +0100
+++ b/absyntax_utils/search_var_instance_decl.hh	Sun May 08 20:01:15 2016 +0100
@@ -171,6 +171,8 @@
     void *visit(input_output_declarations_c *symbol);
     /* ENO : BOOL */
     void *visit(eno_param_declaration_c *symbol);
+    /* EN : BOOL */
+    void *visit(en_param_declaration_c *symbol);
     /* VAR [CONSTANT] var_init_decl_list END_VAR */
     /* option -> may be NULL ! */
     /* helper symbol for input_declarations */
--- a/lib/C/iec_std_FB.h	Sat May 07 21:17:49 2016 +0100
+++ b/lib/C/iec_std_FB.h	Sun May 08 20:01:15 2016 +0100
@@ -6,15 +6,26 @@
 
 /* NOTE: The code in this file was generated by iec2c (i.e. matiec C compiler), using as source
  *        the *.txt files in the 'lib' directory.
- *       The only 'manual' change was to the function prototypes, that were all changed to become 'static'.
- *         e.g.:   static void R_TRIG_init__(...)
- *                 ^^^^^^
+ *       The only 'manual' change was:
+ *          - to merge the generated .h and .c files into this single file
+ *          - to remove the forward declarations of the functions
+ *          - to change the function prototypes to become 'static'.
+ *             e.g.:   static void R_TRIG_init__(...)
+ *                     ^^^^^^
  * 
  * NOTE: If the structure of the C code generated by iec2c (matiec) should change, then this C 'library'
  *       file will need to be recompiled. 
  *       The correct way of going about this would be to have this file be automatically generated during
  *       the build process (i.e. after compiling matiec), but we will leave this for later if it ever
  *       becomes necessary.
+ * 
+ * WARNING: There are 2 versions of this file:
+ *            - file: iec_std_FB.h
+ *              Version to be used when the EN and ENO parameters are implicitly generated
+ *              for all functions and function blocks
+ *            - file: iec_std_FB_no_ENENO.h
+ *              Version to be used when the EN and ENO parameters are NOT implicitly generated
+ *              for all functions and function blocks
  */
 
 #ifndef _IEC_STD_FB_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/C/iec_std_FB_no_ENENO.h	Sun May 08 20:01:15 2016 +0100
@@ -0,0 +1,1548 @@
+
+
+/****
+ * IEC 61131-3 standard function block library
+ */
+
+/* NOTE: The code in this file was generated by iec2c (i.e. matiec C compiler), using as source
+ *        the *.txt files in the 'lib' directory.
+ *       The only 'manual' change was:
+ *          - to merge the generated .h and .c files into this single file
+ *          - to remove the forward declarations of the functions
+ *          - to change the function prototypes to become 'static'.
+ *             e.g.:   static void R_TRIG_init__(...)
+ *                     ^^^^^^
+ * 
+ * NOTE: If the structure of the C code generated by iec2c (matiec) should change, then this C 'library'
+ *       file will need to be recompiled. 
+ *       The correct way of going about this would be to have this file be automatically generated during
+ *       the build process (i.e. after compiling matiec), but we will leave this for later if it ever
+ *       becomes necessary.
+ * 
+ * WARNING: There are 2 versions of this file:
+ *            - file: iec_std_FB.h
+ *              Version to be used when the EN and ENO parameters are implicitly generated
+ *              for all functions and function blocks
+ *            - file: iec_std_FB_no_ENENO.h
+ *              Version to be used when the EN and ENO parameters are NOT implicitly generated
+ *              for all functions and function blocks
+ */
+
+#ifndef _IEC_STD_FB_H
+#define _IEC_STD_FB_H
+
+
+#include "accessor.h"
+
+
+// FUNCTION_BLOCK R_TRIG
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,CLK)
+  __DECLARE_VAR(BOOL,Q)
+
+  // FB private variables - TEMP, private and located variables
+  __DECLARE_VAR(BOOL,M)
+
+} R_TRIG;
+
+// FUNCTION_BLOCK F_TRIG
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,CLK)
+  __DECLARE_VAR(BOOL,Q)
+
+  // FB private variables - TEMP, private and located variables
+  __DECLARE_VAR(BOOL,M)
+
+} F_TRIG;
+
+// FUNCTION_BLOCK SR
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,S1)
+  __DECLARE_VAR(BOOL,R)
+  __DECLARE_VAR(BOOL,Q1)
+
+  // FB private variables - TEMP, private and located variables
+
+} SR;
+
+// FUNCTION_BLOCK RS
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,S)
+  __DECLARE_VAR(BOOL,R1)
+  __DECLARE_VAR(BOOL,Q1)
+
+  // FB private variables - TEMP, private and located variables
+
+} RS;
+
+// FUNCTION_BLOCK CTU
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,CU)
+  __DECLARE_VAR(BOOL,R)
+  __DECLARE_VAR(INT,PV)
+  __DECLARE_VAR(BOOL,Q)
+  __DECLARE_VAR(INT,CV)
+
+  // FB private variables - TEMP, private and located variables
+  R_TRIG CU_T;
+
+} CTU;
+
+// FUNCTION_BLOCK CTU_DINT
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,CU)
+  __DECLARE_VAR(BOOL,R)
+  __DECLARE_VAR(DINT,PV)
+  __DECLARE_VAR(BOOL,Q)
+  __DECLARE_VAR(DINT,CV)
+
+  // FB private variables - TEMP, private and located variables
+  R_TRIG CU_T;
+
+} CTU_DINT;
+
+// FUNCTION_BLOCK CTU_LINT
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,CU)
+  __DECLARE_VAR(BOOL,R)
+  __DECLARE_VAR(LINT,PV)
+  __DECLARE_VAR(BOOL,Q)
+  __DECLARE_VAR(LINT,CV)
+
+  // FB private variables - TEMP, private and located variables
+  R_TRIG CU_T;
+
+} CTU_LINT;
+
+// FUNCTION_BLOCK CTU_UDINT
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,CU)
+  __DECLARE_VAR(BOOL,R)
+  __DECLARE_VAR(UDINT,PV)
+  __DECLARE_VAR(BOOL,Q)
+  __DECLARE_VAR(UDINT,CV)
+
+  // FB private variables - TEMP, private and located variables
+  R_TRIG CU_T;
+
+} CTU_UDINT;
+
+// FUNCTION_BLOCK CTU_ULINT
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,CU)
+  __DECLARE_VAR(BOOL,R)
+  __DECLARE_VAR(ULINT,PV)
+  __DECLARE_VAR(BOOL,Q)
+  __DECLARE_VAR(ULINT,CV)
+
+  // FB private variables - TEMP, private and located variables
+  R_TRIG CU_T;
+
+} CTU_ULINT;
+
+// FUNCTION_BLOCK CTD
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,CD)
+  __DECLARE_VAR(BOOL,LD)
+  __DECLARE_VAR(INT,PV)
+  __DECLARE_VAR(BOOL,Q)
+  __DECLARE_VAR(INT,CV)
+
+  // FB private variables - TEMP, private and located variables
+  R_TRIG CD_T;
+
+} CTD;
+
+// FUNCTION_BLOCK CTD_DINT
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,CD)
+  __DECLARE_VAR(BOOL,LD)
+  __DECLARE_VAR(DINT,PV)
+  __DECLARE_VAR(BOOL,Q)
+  __DECLARE_VAR(DINT,CV)
+
+  // FB private variables - TEMP, private and located variables
+  R_TRIG CD_T;
+
+} CTD_DINT;
+
+// FUNCTION_BLOCK CTD_LINT
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,CD)
+  __DECLARE_VAR(BOOL,LD)
+  __DECLARE_VAR(LINT,PV)
+  __DECLARE_VAR(BOOL,Q)
+  __DECLARE_VAR(LINT,CV)
+
+  // FB private variables - TEMP, private and located variables
+  R_TRIG CD_T;
+
+} CTD_LINT;
+
+// FUNCTION_BLOCK CTD_UDINT
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,CD)
+  __DECLARE_VAR(BOOL,LD)
+  __DECLARE_VAR(UDINT,PV)
+  __DECLARE_VAR(BOOL,Q)
+  __DECLARE_VAR(UDINT,CV)
+
+  // FB private variables - TEMP, private and located variables
+  R_TRIG CD_T;
+
+} CTD_UDINT;
+
+// FUNCTION_BLOCK CTD_ULINT
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,CD)
+  __DECLARE_VAR(BOOL,LD)
+  __DECLARE_VAR(ULINT,PV)
+  __DECLARE_VAR(BOOL,Q)
+  __DECLARE_VAR(ULINT,CV)
+
+  // FB private variables - TEMP, private and located variables
+  R_TRIG CD_T;
+
+} CTD_ULINT;
+
+// FUNCTION_BLOCK CTUD
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,CU)
+  __DECLARE_VAR(BOOL,CD)
+  __DECLARE_VAR(BOOL,R)
+  __DECLARE_VAR(BOOL,LD)
+  __DECLARE_VAR(INT,PV)
+  __DECLARE_VAR(BOOL,QU)
+  __DECLARE_VAR(BOOL,QD)
+  __DECLARE_VAR(INT,CV)
+
+  // FB private variables - TEMP, private and located variables
+  R_TRIG CD_T;
+  R_TRIG CU_T;
+
+} CTUD;
+
+// FUNCTION_BLOCK CTUD_DINT
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,CU)
+  __DECLARE_VAR(BOOL,CD)
+  __DECLARE_VAR(BOOL,R)
+  __DECLARE_VAR(BOOL,LD)
+  __DECLARE_VAR(DINT,PV)
+  __DECLARE_VAR(BOOL,QU)
+  __DECLARE_VAR(BOOL,QD)
+  __DECLARE_VAR(DINT,CV)
+
+  // FB private variables - TEMP, private and located variables
+  R_TRIG CD_T;
+  R_TRIG CU_T;
+
+} CTUD_DINT;
+
+// FUNCTION_BLOCK CTUD_LINT
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,CU)
+  __DECLARE_VAR(BOOL,CD)
+  __DECLARE_VAR(BOOL,R)
+  __DECLARE_VAR(BOOL,LD)
+  __DECLARE_VAR(LINT,PV)
+  __DECLARE_VAR(BOOL,QU)
+  __DECLARE_VAR(BOOL,QD)
+  __DECLARE_VAR(LINT,CV)
+
+  // FB private variables - TEMP, private and located variables
+  R_TRIG CD_T;
+  R_TRIG CU_T;
+
+} CTUD_LINT;
+
+// FUNCTION_BLOCK CTUD_UDINT
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,CU)
+  __DECLARE_VAR(BOOL,CD)
+  __DECLARE_VAR(BOOL,R)
+  __DECLARE_VAR(BOOL,LD)
+  __DECLARE_VAR(UDINT,PV)
+  __DECLARE_VAR(BOOL,QU)
+  __DECLARE_VAR(BOOL,QD)
+  __DECLARE_VAR(UDINT,CV)
+
+  // FB private variables - TEMP, private and located variables
+  R_TRIG CD_T;
+  R_TRIG CU_T;
+
+} CTUD_UDINT;
+
+// FUNCTION_BLOCK CTUD_ULINT
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,CU)
+  __DECLARE_VAR(BOOL,CD)
+  __DECLARE_VAR(BOOL,R)
+  __DECLARE_VAR(BOOL,LD)
+  __DECLARE_VAR(ULINT,PV)
+  __DECLARE_VAR(BOOL,QU)
+  __DECLARE_VAR(BOOL,QD)
+  __DECLARE_VAR(ULINT,CV)
+
+  // FB private variables - TEMP, private and located variables
+  R_TRIG CD_T;
+  R_TRIG CU_T;
+
+} CTUD_ULINT;
+
+// FUNCTION_BLOCK TP
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,IN)
+  __DECLARE_VAR(TIME,PT)
+  __DECLARE_VAR(BOOL,Q)
+  __DECLARE_VAR(TIME,ET)
+
+  // FB private variables - TEMP, private and located variables
+  __DECLARE_VAR(SINT,STATE)
+  __DECLARE_VAR(BOOL,PREV_IN)
+  __DECLARE_VAR(TIME,CURRENT_TIME)
+  __DECLARE_VAR(TIME,START_TIME)
+
+} TP;
+
+// FUNCTION_BLOCK TON
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,IN)
+  __DECLARE_VAR(TIME,PT)
+  __DECLARE_VAR(BOOL,Q)
+  __DECLARE_VAR(TIME,ET)
+
+  // FB private variables - TEMP, private and located variables
+  __DECLARE_VAR(SINT,STATE)
+  __DECLARE_VAR(BOOL,PREV_IN)
+  __DECLARE_VAR(TIME,CURRENT_TIME)
+  __DECLARE_VAR(TIME,START_TIME)
+
+} TON;
+
+// FUNCTION_BLOCK TOF
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,IN)
+  __DECLARE_VAR(TIME,PT)
+  __DECLARE_VAR(BOOL,Q)
+  __DECLARE_VAR(TIME,ET)
+
+  // FB private variables - TEMP, private and located variables
+  __DECLARE_VAR(SINT,STATE)
+  __DECLARE_VAR(BOOL,PREV_IN)
+  __DECLARE_VAR(TIME,CURRENT_TIME)
+  __DECLARE_VAR(TIME,START_TIME)
+
+} TOF;
+
+// FUNCTION_BLOCK DERIVATIVE
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,RUN)
+  __DECLARE_VAR(REAL,XIN)
+  __DECLARE_VAR(TIME,CYCLE)
+  __DECLARE_VAR(REAL,XOUT)
+
+  // FB private variables - TEMP, private and located variables
+  __DECLARE_VAR(REAL,X1)
+  __DECLARE_VAR(REAL,X2)
+  __DECLARE_VAR(REAL,X3)
+
+} DERIVATIVE;
+
+// FUNCTION_BLOCK HYSTERESIS
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(REAL,XIN1)
+  __DECLARE_VAR(REAL,XIN2)
+  __DECLARE_VAR(REAL,EPS)
+  __DECLARE_VAR(BOOL,Q)
+
+  // FB private variables - TEMP, private and located variables
+
+} HYSTERESIS;
+
+// FUNCTION_BLOCK INTEGRAL
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,RUN)
+  __DECLARE_VAR(BOOL,R1)
+  __DECLARE_VAR(REAL,XIN)
+  __DECLARE_VAR(REAL,X0)
+  __DECLARE_VAR(TIME,CYCLE)
+  __DECLARE_VAR(BOOL,Q)
+  __DECLARE_VAR(REAL,XOUT)
+
+  // FB private variables - TEMP, private and located variables
+
+} INTEGRAL;
+
+// FUNCTION_BLOCK PID
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,AUTO)
+  __DECLARE_VAR(REAL,PV)
+  __DECLARE_VAR(REAL,SP)
+  __DECLARE_VAR(REAL,X0)
+  __DECLARE_VAR(REAL,KP)
+  __DECLARE_VAR(REAL,TR)
+  __DECLARE_VAR(REAL,TD)
+  __DECLARE_VAR(TIME,CYCLE)
+  __DECLARE_VAR(REAL,XOUT)
+
+  // FB private variables - TEMP, private and located variables
+  __DECLARE_VAR(REAL,ERROR)
+  INTEGRAL ITERM;
+  DERIVATIVE DTERM;
+
+} PID;
+
+// FUNCTION_BLOCK RAMP
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,RUN)
+  __DECLARE_VAR(REAL,X0)
+  __DECLARE_VAR(REAL,X1)
+  __DECLARE_VAR(TIME,TR)
+  __DECLARE_VAR(TIME,CYCLE)
+  __DECLARE_VAR(BOOL,BUSY)
+  __DECLARE_VAR(REAL,XOUT)
+
+  // FB private variables - TEMP, private and located variables
+  __DECLARE_VAR(REAL,XI)
+  __DECLARE_VAR(TIME,T)
+
+} RAMP;
+
+// FUNCTION_BLOCK RTC
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,IN)
+  __DECLARE_VAR(DT,PDT)
+  __DECLARE_VAR(BOOL,Q)
+  __DECLARE_VAR(DT,CDT)
+
+  // FB private variables - TEMP, private and located variables
+  __DECLARE_VAR(BOOL,PREV_IN)
+  __DECLARE_VAR(TIME,OFFSET)
+  __DECLARE_VAR(DT,CURRENT_TIME)
+
+} RTC;
+
+// FUNCTION_BLOCK SEMA
+// Data part
+typedef struct {
+  // FB Interface - IN, OUT, IN_OUT variables
+  __DECLARE_VAR(BOOL,CLAIM)
+  __DECLARE_VAR(BOOL,RELEASE)
+  __DECLARE_VAR(BOOL,BUSY)
+
+  // FB private variables - TEMP, private and located variables
+  __DECLARE_VAR(BOOL,Q_INTERNAL)
+
+} SEMA;
+
+
+
+
+static void R_TRIG_init__(R_TRIG *data__, BOOL retain) {
+  __INIT_VAR(data__->CLK,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->M,__BOOL_LITERAL(FALSE),1)
+}
+
+// Code part
+static void R_TRIG_body__(R_TRIG *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->,Q,,(__GET_VAR(data__->CLK,) && !(__GET_VAR(data__->M,))));
+__SET_VAR(data__->,M,,__GET_VAR(data__->CLK,));
+
+goto __end;
+
+__end:
+  return;
+} // R_TRIG_body__() 
+
+
+
+
+
+static void F_TRIG_init__(F_TRIG *data__, BOOL retain) {
+  __INIT_VAR(data__->CLK,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->M,__BOOL_LITERAL(FALSE),1)
+}
+
+// Code part
+static void F_TRIG_body__(F_TRIG *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->,Q,,(!(__GET_VAR(data__->CLK,)) && !(__GET_VAR(data__->M,))));
+__SET_VAR(data__->,M,,!(__GET_VAR(data__->CLK,)));
+
+goto __end;
+
+__end:
+  return;
+} // F_TRIG_body__() 
+
+
+
+
+
+static void SR_init__(SR *data__, BOOL retain) {
+  __INIT_VAR(data__->S1,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->R,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->Q1,__BOOL_LITERAL(FALSE),retain)
+}
+
+// Code part
+static void SR_body__(SR *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->,Q1,,(__GET_VAR(data__->S1,) || (!(__GET_VAR(data__->R,)) && __GET_VAR(data__->Q1,))));
+
+goto __end;
+
+__end:
+  return;
+} // SR_body__() 
+
+
+
+
+
+static void RS_init__(RS *data__, BOOL retain) {
+  __INIT_VAR(data__->S,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->R1,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->Q1,__BOOL_LITERAL(FALSE),retain)
+}
+
+// Code part
+static void RS_body__(RS *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->,Q1,,(!(__GET_VAR(data__->R1,)) && (__GET_VAR(data__->S,) || __GET_VAR(data__->Q1,))));
+
+goto __end;
+
+__end:
+  return;
+} // RS_body__() 
+
+
+
+
+
+static void CTU_init__(CTU *data__, BOOL retain) {
+  __INIT_VAR(data__->CU,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->R,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->PV,0,retain)
+  __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CV,0,retain)
+  R_TRIG_init__(&data__->CU_T,retain);
+}
+
+// Code part
+static void CTU_body__(CTU *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->CU_T.,CLK,,__GET_VAR(data__->CU,));
+R_TRIG_body__(&data__->CU_T);
+if (__GET_VAR(data__->R,)) {
+  __SET_VAR(data__->,CV,,0);
+} else if ((__GET_VAR(data__->CU_T.Q,) && (__GET_VAR(data__->CV,) < __GET_VAR(data__->PV,)))) {
+  __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) + 1));
+};
+__SET_VAR(data__->,Q,,(__GET_VAR(data__->CV,) >= __GET_VAR(data__->PV,)));
+
+goto __end;
+
+__end:
+  return;
+} // CTU_body__() 
+
+
+
+
+
+static void CTU_DINT_init__(CTU_DINT *data__, BOOL retain) {
+  __INIT_VAR(data__->CU,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->R,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->PV,0,retain)
+  __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CV,0,retain)
+  R_TRIG_init__(&data__->CU_T,retain);
+}
+
+// Code part
+static void CTU_DINT_body__(CTU_DINT *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->CU_T.,CLK,,__GET_VAR(data__->CU,));
+R_TRIG_body__(&data__->CU_T);
+if (__GET_VAR(data__->R,)) {
+  __SET_VAR(data__->,CV,,0);
+} else if ((__GET_VAR(data__->CU_T.Q,) && (__GET_VAR(data__->CV,) < __GET_VAR(data__->PV,)))) {
+  __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) + 1));
+};
+__SET_VAR(data__->,Q,,(__GET_VAR(data__->CV,) >= __GET_VAR(data__->PV,)));
+
+goto __end;
+
+__end:
+  return;
+} // CTU_DINT_body__() 
+
+
+
+
+
+static void CTU_LINT_init__(CTU_LINT *data__, BOOL retain) {
+  __INIT_VAR(data__->CU,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->R,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->PV,0,retain)
+  __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CV,0,retain)
+  R_TRIG_init__(&data__->CU_T,retain);
+}
+
+// Code part
+static void CTU_LINT_body__(CTU_LINT *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->CU_T.,CLK,,__GET_VAR(data__->CU,));
+R_TRIG_body__(&data__->CU_T);
+if (__GET_VAR(data__->R,)) {
+  __SET_VAR(data__->,CV,,0);
+} else if ((__GET_VAR(data__->CU_T.Q,) && (__GET_VAR(data__->CV,) < __GET_VAR(data__->PV,)))) {
+  __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) + 1));
+};
+__SET_VAR(data__->,Q,,(__GET_VAR(data__->CV,) >= __GET_VAR(data__->PV,)));
+
+goto __end;
+
+__end:
+  return;
+} // CTU_LINT_body__() 
+
+
+
+
+
+static void CTU_UDINT_init__(CTU_UDINT *data__, BOOL retain) {
+  __INIT_VAR(data__->CU,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->R,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->PV,0,retain)
+  __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CV,0,retain)
+  R_TRIG_init__(&data__->CU_T,retain);
+}
+
+// Code part
+static void CTU_UDINT_body__(CTU_UDINT *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->CU_T.,CLK,,__GET_VAR(data__->CU,));
+R_TRIG_body__(&data__->CU_T);
+if (__GET_VAR(data__->R,)) {
+  __SET_VAR(data__->,CV,,0);
+} else if ((__GET_VAR(data__->CU_T.Q,) && (__GET_VAR(data__->CV,) < __GET_VAR(data__->PV,)))) {
+  __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) + 1));
+};
+__SET_VAR(data__->,Q,,(__GET_VAR(data__->CV,) >= __GET_VAR(data__->PV,)));
+
+goto __end;
+
+__end:
+  return;
+} // CTU_UDINT_body__() 
+
+
+
+
+
+static void CTU_ULINT_init__(CTU_ULINT *data__, BOOL retain) {
+  __INIT_VAR(data__->CU,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->R,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->PV,0,retain)
+  __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CV,0,retain)
+  R_TRIG_init__(&data__->CU_T,retain);
+}
+
+// Code part
+static void CTU_ULINT_body__(CTU_ULINT *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->CU_T.,CLK,,__GET_VAR(data__->CU,));
+R_TRIG_body__(&data__->CU_T);
+if (__GET_VAR(data__->R,)) {
+  __SET_VAR(data__->,CV,,0);
+} else if ((__GET_VAR(data__->CU_T.Q,) && (__GET_VAR(data__->CV,) < __GET_VAR(data__->PV,)))) {
+  __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) + 1));
+};
+__SET_VAR(data__->,Q,,(__GET_VAR(data__->CV,) >= __GET_VAR(data__->PV,)));
+
+goto __end;
+
+__end:
+  return;
+} // CTU_ULINT_body__() 
+
+
+
+
+
+static void CTD_init__(CTD *data__, BOOL retain) {
+  __INIT_VAR(data__->CD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->LD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->PV,0,retain)
+  __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CV,0,retain)
+  R_TRIG_init__(&data__->CD_T,retain);
+}
+
+// Code part
+static void CTD_body__(CTD *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->CD_T.,CLK,,__GET_VAR(data__->CD,));
+R_TRIG_body__(&data__->CD_T);
+if (__GET_VAR(data__->LD,)) {
+  __SET_VAR(data__->,CV,,__GET_VAR(data__->PV,));
+} else if ((__GET_VAR(data__->CD_T.Q,) && (__GET_VAR(data__->CV,) > 0))) {
+  __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) - 1));
+};
+__SET_VAR(data__->,Q,,(__GET_VAR(data__->CV,) <= 0));
+
+goto __end;
+
+__end:
+  return;
+} // CTD_body__() 
+
+
+
+
+
+static void CTD_DINT_init__(CTD_DINT *data__, BOOL retain) {
+  __INIT_VAR(data__->CD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->LD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->PV,0,retain)
+  __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CV,0,retain)
+  R_TRIG_init__(&data__->CD_T,retain);
+}
+
+// Code part
+static void CTD_DINT_body__(CTD_DINT *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->CD_T.,CLK,,__GET_VAR(data__->CD,));
+R_TRIG_body__(&data__->CD_T);
+if (__GET_VAR(data__->LD,)) {
+  __SET_VAR(data__->,CV,,__GET_VAR(data__->PV,));
+} else if ((__GET_VAR(data__->CD_T.Q,) && (__GET_VAR(data__->CV,) > 0))) {
+  __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) - 1));
+};
+__SET_VAR(data__->,Q,,(__GET_VAR(data__->CV,) <= 0));
+
+goto __end;
+
+__end:
+  return;
+} // CTD_DINT_body__() 
+
+
+
+
+
+static void CTD_LINT_init__(CTD_LINT *data__, BOOL retain) {
+  __INIT_VAR(data__->CD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->LD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->PV,0,retain)
+  __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CV,0,retain)
+  R_TRIG_init__(&data__->CD_T,retain);
+}
+
+// Code part
+static void CTD_LINT_body__(CTD_LINT *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->CD_T.,CLK,,__GET_VAR(data__->CD,));
+R_TRIG_body__(&data__->CD_T);
+if (__GET_VAR(data__->LD,)) {
+  __SET_VAR(data__->,CV,,__GET_VAR(data__->PV,));
+} else if ((__GET_VAR(data__->CD_T.Q,) && (__GET_VAR(data__->CV,) > 0))) {
+  __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) - 1));
+};
+__SET_VAR(data__->,Q,,(__GET_VAR(data__->CV,) <= 0));
+
+goto __end;
+
+__end:
+  return;
+} // CTD_LINT_body__() 
+
+
+
+
+
+static void CTD_UDINT_init__(CTD_UDINT *data__, BOOL retain) {
+  __INIT_VAR(data__->CD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->LD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->PV,0,retain)
+  __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CV,0,retain)
+  R_TRIG_init__(&data__->CD_T,retain);
+}
+
+// Code part
+static void CTD_UDINT_body__(CTD_UDINT *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->CD_T.,CLK,,__GET_VAR(data__->CD,));
+R_TRIG_body__(&data__->CD_T);
+if (__GET_VAR(data__->LD,)) {
+  __SET_VAR(data__->,CV,,__GET_VAR(data__->PV,));
+} else if ((__GET_VAR(data__->CD_T.Q,) && (__GET_VAR(data__->CV,) > 0))) {
+  __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) - 1));
+};
+__SET_VAR(data__->,Q,,(__GET_VAR(data__->CV,) <= 0));
+
+goto __end;
+
+__end:
+  return;
+} // CTD_UDINT_body__() 
+
+
+
+
+
+static void CTD_ULINT_init__(CTD_ULINT *data__, BOOL retain) {
+  __INIT_VAR(data__->CD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->LD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->PV,0,retain)
+  __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CV,0,retain)
+  R_TRIG_init__(&data__->CD_T,retain);
+}
+
+// Code part
+static void CTD_ULINT_body__(CTD_ULINT *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->CD_T.,CLK,,__GET_VAR(data__->CD,));
+R_TRIG_body__(&data__->CD_T);
+if (__GET_VAR(data__->LD,)) {
+  __SET_VAR(data__->,CV,,__GET_VAR(data__->PV,));
+} else if ((__GET_VAR(data__->CD_T.Q,) && (__GET_VAR(data__->CV,) > 0))) {
+  __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) - 1));
+};
+__SET_VAR(data__->,Q,,(__GET_VAR(data__->CV,) <= 0));
+
+goto __end;
+
+__end:
+  return;
+} // CTD_ULINT_body__() 
+
+
+
+
+
+static void CTUD_init__(CTUD *data__, BOOL retain) {
+  __INIT_VAR(data__->CU,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->R,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->LD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->PV,0,retain)
+  __INIT_VAR(data__->QU,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->QD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CV,0,retain)
+  R_TRIG_init__(&data__->CD_T,retain);
+  R_TRIG_init__(&data__->CU_T,retain);
+}
+
+// Code part
+static void CTUD_body__(CTUD *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->CD_T.,CLK,,__GET_VAR(data__->CD,));
+R_TRIG_body__(&data__->CD_T);
+__SET_VAR(data__->CU_T.,CLK,,__GET_VAR(data__->CU,));
+R_TRIG_body__(&data__->CU_T);
+if (__GET_VAR(data__->R,)) {
+  __SET_VAR(data__->,CV,,0);
+} else if (__GET_VAR(data__->LD,)) {
+  __SET_VAR(data__->,CV,,__GET_VAR(data__->PV,));
+} else {
+  if (!((__GET_VAR(data__->CU_T.Q,) && __GET_VAR(data__->CD_T.Q,)))) {
+    if ((__GET_VAR(data__->CU_T.Q,) && (__GET_VAR(data__->CV,) < __GET_VAR(data__->PV,)))) {
+      __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) + 1));
+    } else if ((__GET_VAR(data__->CD_T.Q,) && (__GET_VAR(data__->CV,) > 0))) {
+      __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) - 1));
+    };
+  };
+};
+__SET_VAR(data__->,QU,,(__GET_VAR(data__->CV,) >= __GET_VAR(data__->PV,)));
+__SET_VAR(data__->,QD,,(__GET_VAR(data__->CV,) <= 0));
+
+goto __end;
+
+__end:
+  return;
+} // CTUD_body__() 
+
+
+
+
+
+static void CTUD_DINT_init__(CTUD_DINT *data__, BOOL retain) {
+  __INIT_VAR(data__->CU,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->R,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->LD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->PV,0,retain)
+  __INIT_VAR(data__->QU,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->QD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CV,0,retain)
+  R_TRIG_init__(&data__->CD_T,retain);
+  R_TRIG_init__(&data__->CU_T,retain);
+}
+
+// Code part
+static void CTUD_DINT_body__(CTUD_DINT *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->CD_T.,CLK,,__GET_VAR(data__->CD,));
+R_TRIG_body__(&data__->CD_T);
+__SET_VAR(data__->CU_T.,CLK,,__GET_VAR(data__->CU,));
+R_TRIG_body__(&data__->CU_T);
+if (__GET_VAR(data__->R,)) {
+  __SET_VAR(data__->,CV,,0);
+} else if (__GET_VAR(data__->LD,)) {
+  __SET_VAR(data__->,CV,,__GET_VAR(data__->PV,));
+} else {
+  if (!((__GET_VAR(data__->CU_T.Q,) && __GET_VAR(data__->CD_T.Q,)))) {
+    if ((__GET_VAR(data__->CU_T.Q,) && (__GET_VAR(data__->CV,) < __GET_VAR(data__->PV,)))) {
+      __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) + 1));
+    } else if ((__GET_VAR(data__->CD_T.Q,) && (__GET_VAR(data__->CV,) > 0))) {
+      __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) - 1));
+    };
+  };
+};
+__SET_VAR(data__->,QU,,(__GET_VAR(data__->CV,) >= __GET_VAR(data__->PV,)));
+__SET_VAR(data__->,QD,,(__GET_VAR(data__->CV,) <= 0));
+
+goto __end;
+
+__end:
+  return;
+} // CTUD_DINT_body__() 
+
+
+
+
+
+static void CTUD_LINT_init__(CTUD_LINT *data__, BOOL retain) {
+  __INIT_VAR(data__->CU,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->R,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->LD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->PV,0,retain)
+  __INIT_VAR(data__->QU,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->QD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CV,0,retain)
+  R_TRIG_init__(&data__->CD_T,retain);
+  R_TRIG_init__(&data__->CU_T,retain);
+}
+
+// Code part
+static void CTUD_LINT_body__(CTUD_LINT *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->CD_T.,CLK,,__GET_VAR(data__->CD,));
+R_TRIG_body__(&data__->CD_T);
+__SET_VAR(data__->CU_T.,CLK,,__GET_VAR(data__->CU,));
+R_TRIG_body__(&data__->CU_T);
+if (__GET_VAR(data__->R,)) {
+  __SET_VAR(data__->,CV,,0);
+} else if (__GET_VAR(data__->LD,)) {
+  __SET_VAR(data__->,CV,,__GET_VAR(data__->PV,));
+} else {
+  if (!((__GET_VAR(data__->CU_T.Q,) && __GET_VAR(data__->CD_T.Q,)))) {
+    if ((__GET_VAR(data__->CU_T.Q,) && (__GET_VAR(data__->CV,) < __GET_VAR(data__->PV,)))) {
+      __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) + 1));
+    } else if ((__GET_VAR(data__->CD_T.Q,) && (__GET_VAR(data__->CV,) > 0))) {
+      __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) - 1));
+    };
+  };
+};
+__SET_VAR(data__->,QU,,(__GET_VAR(data__->CV,) >= __GET_VAR(data__->PV,)));
+__SET_VAR(data__->,QD,,(__GET_VAR(data__->CV,) <= 0));
+
+goto __end;
+
+__end:
+  return;
+} // CTUD_LINT_body__() 
+
+
+
+
+
+static void CTUD_UDINT_init__(CTUD_UDINT *data__, BOOL retain) {
+  __INIT_VAR(data__->CU,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->R,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->LD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->PV,0,retain)
+  __INIT_VAR(data__->QU,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->QD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CV,0,retain)
+  R_TRIG_init__(&data__->CD_T,retain);
+  R_TRIG_init__(&data__->CU_T,retain);
+}
+
+// Code part
+static void CTUD_UDINT_body__(CTUD_UDINT *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->CD_T.,CLK,,__GET_VAR(data__->CD,));
+R_TRIG_body__(&data__->CD_T);
+__SET_VAR(data__->CU_T.,CLK,,__GET_VAR(data__->CU,));
+R_TRIG_body__(&data__->CU_T);
+if (__GET_VAR(data__->R,)) {
+  __SET_VAR(data__->,CV,,0);
+} else if (__GET_VAR(data__->LD,)) {
+  __SET_VAR(data__->,CV,,__GET_VAR(data__->PV,));
+} else {
+  if (!((__GET_VAR(data__->CU_T.Q,) && __GET_VAR(data__->CD_T.Q,)))) {
+    if ((__GET_VAR(data__->CU_T.Q,) && (__GET_VAR(data__->CV,) < __GET_VAR(data__->PV,)))) {
+      __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) + 1));
+    } else if ((__GET_VAR(data__->CD_T.Q,) && (__GET_VAR(data__->CV,) > 0))) {
+      __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) - 1));
+    };
+  };
+};
+__SET_VAR(data__->,QU,,(__GET_VAR(data__->CV,) >= __GET_VAR(data__->PV,)));
+__SET_VAR(data__->,QD,,(__GET_VAR(data__->CV,) <= 0));
+
+goto __end;
+
+__end:
+  return;
+} // CTUD_UDINT_body__() 
+
+
+
+
+
+static void CTUD_ULINT_init__(CTUD_ULINT *data__, BOOL retain) {
+  __INIT_VAR(data__->CU,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->R,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->LD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->PV,0,retain)
+  __INIT_VAR(data__->QU,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->QD,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CV,0,retain)
+  R_TRIG_init__(&data__->CD_T,retain);
+  R_TRIG_init__(&data__->CU_T,retain);
+}
+
+// Code part
+static void CTUD_ULINT_body__(CTUD_ULINT *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->CD_T.,CLK,,__GET_VAR(data__->CD,));
+R_TRIG_body__(&data__->CD_T);
+__SET_VAR(data__->CU_T.,CLK,,__GET_VAR(data__->CU,));
+R_TRIG_body__(&data__->CU_T);
+if (__GET_VAR(data__->R,)) {
+  __SET_VAR(data__->,CV,,0);
+} else if (__GET_VAR(data__->LD,)) {
+  __SET_VAR(data__->,CV,,__GET_VAR(data__->PV,));
+} else {
+  if (!((__GET_VAR(data__->CU_T.Q,) && __GET_VAR(data__->CD_T.Q,)))) {
+    if ((__GET_VAR(data__->CU_T.Q,) && (__GET_VAR(data__->CV,) < __GET_VAR(data__->PV,)))) {
+      __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) + 1));
+    } else if ((__GET_VAR(data__->CD_T.Q,) && (__GET_VAR(data__->CV,) > 0))) {
+      __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) - 1));
+    };
+  };
+};
+__SET_VAR(data__->,QU,,(__GET_VAR(data__->CV,) >= __GET_VAR(data__->PV,)));
+__SET_VAR(data__->,QD,,(__GET_VAR(data__->CV,) <= 0));
+
+goto __end;
+
+__end:
+  return;
+} // CTUD_ULINT_body__() 
+
+
+
+
+
+static void TP_init__(TP *data__, BOOL retain) {
+  __INIT_VAR(data__->IN,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->PT,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)
+  __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->ET,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)
+  __INIT_VAR(data__->STATE,0,retain)
+  __INIT_VAR(data__->PREV_IN,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CURRENT_TIME,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)
+  __INIT_VAR(data__->START_TIME,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)
+}
+
+// Code part
+static void TP_body__(TP *data__) {
+// Initialise TEMP variables
+
+#define GetFbVar(var,...) __GET_VAR(data__->var,__VA_ARGS__)
+#define SetFbVar(var,val,...) __SET_VAR(data__->,var,__VA_ARGS__,val)
+__SET_VAR(data__->,CURRENT_TIME,,__CURRENT_TIME)
+#undef GetFbVar
+#undef SetFbVar
+;
+if ((((__GET_VAR(data__->STATE,) == 0) && !(__GET_VAR(data__->PREV_IN,))) && __GET_VAR(data__->IN,))) {
+  __SET_VAR(data__->,STATE,,1);
+  __SET_VAR(data__->,Q,,__BOOL_LITERAL(TRUE));
+  __SET_VAR(data__->,START_TIME,,__GET_VAR(data__->CURRENT_TIME,));
+} else if ((__GET_VAR(data__->STATE,) == 1)) {
+  if (LE_TIME(2, __time_add(__GET_VAR(data__->START_TIME,), __GET_VAR(data__->PT,)), __GET_VAR(data__->CURRENT_TIME,))) {
+    __SET_VAR(data__->,STATE,,2);
+    __SET_VAR(data__->,Q,,__BOOL_LITERAL(FALSE));
+    __SET_VAR(data__->,ET,,__GET_VAR(data__->PT,));
+  } else {
+    __SET_VAR(data__->,ET,,__time_sub(__GET_VAR(data__->CURRENT_TIME,), __GET_VAR(data__->START_TIME,)));
+  };
+};
+if (((__GET_VAR(data__->STATE,) == 2) && !(__GET_VAR(data__->IN,)))) {
+  __SET_VAR(data__->,ET,,__time_to_timespec(1, 0, 0, 0, 0, 0));
+  __SET_VAR(data__->,STATE,,0);
+};
+__SET_VAR(data__->,PREV_IN,,__GET_VAR(data__->IN,));
+
+goto __end;
+
+__end:
+  return;
+} // TP_body__() 
+
+
+
+
+
+static void TON_init__(TON *data__, BOOL retain) {
+  __INIT_VAR(data__->IN,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->PT,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)
+  __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->ET,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)
+  __INIT_VAR(data__->STATE,0,retain)
+  __INIT_VAR(data__->PREV_IN,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CURRENT_TIME,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)
+  __INIT_VAR(data__->START_TIME,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)
+}
+
+// Code part
+static void TON_body__(TON *data__) {
+// Initialise TEMP variables
+
+#define GetFbVar(var,...) __GET_VAR(data__->var,__VA_ARGS__)
+#define SetFbVar(var,val,...) __SET_VAR(data__->,var,__VA_ARGS__,val)
+__SET_VAR(data__->,CURRENT_TIME,,__CURRENT_TIME)
+#undef GetFbVar
+#undef SetFbVar
+;
+if ((((__GET_VAR(data__->STATE,) == 0) && !(__GET_VAR(data__->PREV_IN,))) && __GET_VAR(data__->IN,))) {
+  __SET_VAR(data__->,STATE,,1);
+  __SET_VAR(data__->,Q,,__BOOL_LITERAL(FALSE));
+  __SET_VAR(data__->,START_TIME,,__GET_VAR(data__->CURRENT_TIME,));
+} else {
+  if (!(__GET_VAR(data__->IN,))) {
+    __SET_VAR(data__->,ET,,__time_to_timespec(1, 0, 0, 0, 0, 0));
+    __SET_VAR(data__->,Q,,__BOOL_LITERAL(FALSE));
+    __SET_VAR(data__->,STATE,,0);
+  } else if ((__GET_VAR(data__->STATE,) == 1)) {
+    if (LE_TIME(2, __time_add(__GET_VAR(data__->START_TIME,), __GET_VAR(data__->PT,)), __GET_VAR(data__->CURRENT_TIME,))) {
+      __SET_VAR(data__->,STATE,,2);
+      __SET_VAR(data__->,Q,,__BOOL_LITERAL(TRUE));
+      __SET_VAR(data__->,ET,,__GET_VAR(data__->PT,));
+    } else {
+      __SET_VAR(data__->,ET,,__time_sub(__GET_VAR(data__->CURRENT_TIME,), __GET_VAR(data__->START_TIME,)));
+    };
+  };
+};
+__SET_VAR(data__->,PREV_IN,,__GET_VAR(data__->IN,));
+
+goto __end;
+
+__end:
+  return;
+} // TON_body__() 
+
+
+
+
+
+static void TOF_init__(TOF *data__, BOOL retain) {
+  __INIT_VAR(data__->IN,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->PT,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)
+  __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->ET,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)
+  __INIT_VAR(data__->STATE,0,retain)
+  __INIT_VAR(data__->PREV_IN,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CURRENT_TIME,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)
+  __INIT_VAR(data__->START_TIME,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)
+}
+
+// Code part
+static void TOF_body__(TOF *data__) {
+// Initialise TEMP variables
+
+#define GetFbVar(var,...) __GET_VAR(data__->var,__VA_ARGS__)
+#define SetFbVar(var,val,...) __SET_VAR(data__->,var,__VA_ARGS__,val)
+__SET_VAR(data__->,CURRENT_TIME,,__CURRENT_TIME)
+#undef GetFbVar
+#undef SetFbVar
+;
+if ((((__GET_VAR(data__->STATE,) == 0) && __GET_VAR(data__->PREV_IN,)) && !(__GET_VAR(data__->IN,)))) {
+  __SET_VAR(data__->,STATE,,1);
+  __SET_VAR(data__->,START_TIME,,__GET_VAR(data__->CURRENT_TIME,));
+} else {
+  if (__GET_VAR(data__->IN,)) {
+    __SET_VAR(data__->,ET,,__time_to_timespec(1, 0, 0, 0, 0, 0));
+    __SET_VAR(data__->,STATE,,0);
+  } else if ((__GET_VAR(data__->STATE,) == 1)) {
+    if (LE_TIME(2, __time_add(__GET_VAR(data__->START_TIME,), __GET_VAR(data__->PT,)), __GET_VAR(data__->CURRENT_TIME,))) {
+      __SET_VAR(data__->,STATE,,2);
+      __SET_VAR(data__->,ET,,__GET_VAR(data__->PT,));
+    } else {
+      __SET_VAR(data__->,ET,,__time_sub(__GET_VAR(data__->CURRENT_TIME,), __GET_VAR(data__->START_TIME,)));
+    };
+  };
+};
+__SET_VAR(data__->,Q,,(__GET_VAR(data__->IN,) || (__GET_VAR(data__->STATE,) == 1)));
+__SET_VAR(data__->,PREV_IN,,__GET_VAR(data__->IN,));
+
+goto __end;
+
+__end:
+  return;
+} // TOF_body__() 
+
+
+
+
+
+static void DERIVATIVE_init__(DERIVATIVE *data__, BOOL retain) {
+  __INIT_VAR(data__->RUN,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->XIN,0,retain)
+  __INIT_VAR(data__->CYCLE,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)
+  __INIT_VAR(data__->XOUT,0,retain)
+  __INIT_VAR(data__->X1,0,retain)
+  __INIT_VAR(data__->X2,0,retain)
+  __INIT_VAR(data__->X3,0,retain)
+}
+
+// Code part
+static void DERIVATIVE_body__(DERIVATIVE *data__) {
+// Initialise TEMP variables
+
+if (__GET_VAR(data__->RUN,)) {
+  __SET_VAR(data__->,XOUT,,((((3.0 * (__GET_VAR(data__->XIN,) - __GET_VAR(data__->X3,))) + __GET_VAR(data__->X1,)) - __GET_VAR(data__->X2,)) / (10.0 * TIME_TO_REAL((TIME)__GET_VAR(data__->CYCLE,)))));
+  __SET_VAR(data__->,X3,,__GET_VAR(data__->X2,));
+  __SET_VAR(data__->,X2,,__GET_VAR(data__->X1,));
+  __SET_VAR(data__->,X1,,__GET_VAR(data__->XIN,));
+} else {
+  __SET_VAR(data__->,XOUT,,0.0);
+  __SET_VAR(data__->,X1,,__GET_VAR(data__->XIN,));
+  __SET_VAR(data__->,X2,,__GET_VAR(data__->XIN,));
+  __SET_VAR(data__->,X3,,__GET_VAR(data__->XIN,));
+};
+
+goto __end;
+
+__end:
+  return;
+} // DERIVATIVE_body__() 
+
+
+
+
+
+static void HYSTERESIS_init__(HYSTERESIS *data__, BOOL retain) {
+  __INIT_VAR(data__->XIN1,0,retain)
+  __INIT_VAR(data__->XIN2,0,retain)
+  __INIT_VAR(data__->EPS,0,retain)
+  __INIT_VAR(data__->Q,0,retain)
+}
+
+// Code part
+static void HYSTERESIS_body__(HYSTERESIS *data__) {
+// Initialise TEMP variables
+
+if (__GET_VAR(data__->Q,)) {
+  if ((__GET_VAR(data__->XIN1,) < (__GET_VAR(data__->XIN2,) - __GET_VAR(data__->EPS,)))) {
+    __SET_VAR(data__->,Q,,0);
+  };
+} else if ((__GET_VAR(data__->XIN1,) > (__GET_VAR(data__->XIN2,) + __GET_VAR(data__->EPS,)))) {
+  __SET_VAR(data__->,Q,,1);
+};
+
+goto __end;
+
+__end:
+  return;
+} // HYSTERESIS_body__() 
+
+
+
+
+
+static void INTEGRAL_init__(INTEGRAL *data__, BOOL retain) {
+  __INIT_VAR(data__->RUN,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->R1,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->XIN,0,retain)
+  __INIT_VAR(data__->X0,0,retain)
+  __INIT_VAR(data__->CYCLE,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)
+  __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->XOUT,0,retain)
+}
+
+// Code part
+static void INTEGRAL_body__(INTEGRAL *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->,Q,,!(__GET_VAR(data__->R1,)));
+if (__GET_VAR(data__->R1,)) {
+  __SET_VAR(data__->,XOUT,,__GET_VAR(data__->X0,));
+} else if (__GET_VAR(data__->RUN,)) {
+  __SET_VAR(data__->,XOUT,,(__GET_VAR(data__->XOUT,) + (__GET_VAR(data__->XIN,) * TIME_TO_REAL((TIME)__GET_VAR(data__->CYCLE,)))));
+};
+
+goto __end;
+
+__end:
+  return;
+} // INTEGRAL_body__() 
+
+
+
+
+
+static void PID_init__(PID *data__, BOOL retain) {
+  __INIT_VAR(data__->AUTO,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->PV,0,retain)
+  __INIT_VAR(data__->SP,0,retain)
+  __INIT_VAR(data__->X0,0,retain)
+  __INIT_VAR(data__->KP,0,retain)
+  __INIT_VAR(data__->TR,0,retain)
+  __INIT_VAR(data__->TD,0,retain)
+  __INIT_VAR(data__->CYCLE,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)
+  __INIT_VAR(data__->XOUT,0,retain)
+  __INIT_VAR(data__->ERROR,0,retain)
+  INTEGRAL_init__(&data__->ITERM,retain);
+  DERIVATIVE_init__(&data__->DTERM,retain);
+}
+
+// Code part
+static void PID_body__(PID *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->,ERROR,,(__GET_VAR(data__->PV,) - __GET_VAR(data__->SP,)));
+__SET_VAR(data__->ITERM.,RUN,,__GET_VAR(data__->AUTO,));
+__SET_VAR(data__->ITERM.,R1,,!(__GET_VAR(data__->AUTO,)));
+__SET_VAR(data__->ITERM.,XIN,,__GET_VAR(data__->ERROR,));
+__SET_VAR(data__->ITERM.,X0,,(__GET_VAR(data__->TR,) * (__GET_VAR(data__->X0,) - __GET_VAR(data__->ERROR,))));
+__SET_VAR(data__->ITERM.,CYCLE,,__GET_VAR(data__->CYCLE,));
+INTEGRAL_body__(&data__->ITERM);
+__SET_VAR(data__->DTERM.,RUN,,__GET_VAR(data__->AUTO,));
+__SET_VAR(data__->DTERM.,XIN,,__GET_VAR(data__->ERROR,));
+__SET_VAR(data__->DTERM.,CYCLE,,__GET_VAR(data__->CYCLE,));
+DERIVATIVE_body__(&data__->DTERM);
+__SET_VAR(data__->,XOUT,,(__GET_VAR(data__->KP,) * ((__GET_VAR(data__->ERROR,) + (__GET_VAR(data__->ITERM.XOUT,) / __GET_VAR(data__->TR,))) + (__GET_VAR(data__->DTERM.XOUT,) * __GET_VAR(data__->TD,)))));
+
+goto __end;
+
+__end:
+  return;
+} // PID_body__() 
+
+
+
+
+
+static void RAMP_init__(RAMP *data__, BOOL retain) {
+  __INIT_VAR(data__->RUN,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->X0,0,retain)
+  __INIT_VAR(data__->X1,0,retain)
+  __INIT_VAR(data__->TR,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)
+  __INIT_VAR(data__->CYCLE,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)
+  __INIT_VAR(data__->BUSY,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->XOUT,0.0,retain)
+  __INIT_VAR(data__->XI,0,retain)
+  __INIT_VAR(data__->T,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)
+}
+
+// Code part
+static void RAMP_body__(RAMP *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->,BUSY,,__GET_VAR(data__->RUN,));
+if (__GET_VAR(data__->RUN,)) {
+  if (GE_TIME(2, __GET_VAR(data__->T,), __GET_VAR(data__->TR,))) {
+    __SET_VAR(data__->,BUSY,,0);
+    __SET_VAR(data__->,XOUT,,__GET_VAR(data__->X1,));
+  } else {
+    __SET_VAR(data__->,XOUT,,(__GET_VAR(data__->XI,) + (((__GET_VAR(data__->X1,) - __GET_VAR(data__->XI,)) * TIME_TO_REAL((TIME)__GET_VAR(data__->T,))) / TIME_TO_REAL((TIME)__GET_VAR(data__->TR,)))));
+    __SET_VAR(data__->,T,,__time_add(__GET_VAR(data__->T,), __GET_VAR(data__->CYCLE,)));
+  };
+} else {
+  __SET_VAR(data__->,XOUT,,__GET_VAR(data__->X0,));
+  __SET_VAR(data__->,XI,,__GET_VAR(data__->X0,));
+  __SET_VAR(data__->,T,,__time_to_timespec(1, 0, 0, 0, 0, 0));
+};
+
+goto __end;
+
+__end:
+  return;
+} // RAMP_body__() 
+
+
+
+
+
+static void RTC_init__(RTC *data__, BOOL retain) {
+  __INIT_VAR(data__->IN,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->PDT,__dt_to_timespec(0, 0, 0, 1, 1, 1970),retain)
+  __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->CDT,__dt_to_timespec(0, 0, 0, 1, 1, 1970),retain)
+  __INIT_VAR(data__->PREV_IN,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->OFFSET,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)
+  __INIT_VAR(data__->CURRENT_TIME,__dt_to_timespec(0, 0, 0, 1, 1, 1970),retain)
+}
+
+// Code part
+static void RTC_body__(RTC *data__) {
+// Initialise TEMP variables
+
+#define GetFbVar(var,...) __GET_VAR(data__->var,__VA_ARGS__)
+#define SetFbVar(var,val,...) __SET_VAR(data__->,var,__VA_ARGS__,val)
+__SET_VAR(data__->,CURRENT_TIME,,__CURRENT_TIME)
+#undef GetFbVar
+#undef SetFbVar
+;
+if (__GET_VAR(data__->IN,)) {
+  if (!(__GET_VAR(data__->PREV_IN,))) {
+    __SET_VAR(data__->,OFFSET,,__time_sub(__GET_VAR(data__->PDT,), __GET_VAR(data__->CURRENT_TIME,)));
+  };
+  __SET_VAR(data__->,CDT,,__time_add(__GET_VAR(data__->CURRENT_TIME,), __GET_VAR(data__->OFFSET,)));
+} else {
+  __SET_VAR(data__->,CDT,,__GET_VAR(data__->CURRENT_TIME,));
+};
+__SET_VAR(data__->,Q,,__GET_VAR(data__->IN,));
+__SET_VAR(data__->,PREV_IN,,__GET_VAR(data__->IN,));
+
+goto __end;
+
+__end:
+  return;
+} // RTC_body__() 
+
+
+
+
+
+static void SEMA_init__(SEMA *data__, BOOL retain) {
+  __INIT_VAR(data__->CLAIM,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->RELEASE,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->BUSY,__BOOL_LITERAL(FALSE),retain)
+  __INIT_VAR(data__->Q_INTERNAL,__BOOL_LITERAL(FALSE),retain)
+}
+
+// Code part
+static void SEMA_body__(SEMA *data__) {
+// Initialise TEMP variables
+
+__SET_VAR(data__->,Q_INTERNAL,,(__GET_VAR(data__->CLAIM,) || (__GET_VAR(data__->Q_INTERNAL,) && !(__GET_VAR(data__->RELEASE,)))));
+__SET_VAR(data__->,BUSY,,__GET_VAR(data__->Q_INTERNAL,));
+
+goto __end;
+
+__end:
+  return;
+} // SEMA_body__() 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#endif //_IEC_STD_FB_H
\ No newline at end of file
--- a/lib/C/iec_std_functions.h	Sat May 07 21:17:49 2016 +0100
+++ b/lib/C/iec_std_functions.h	Sun May 08 20:01:15 2016 +0100
@@ -82,28 +82,40 @@
 /********************/
 /*   EN/ENO PARAMS  */
 /********************/
-
-#define EN_ENO_PARAMS BOOL EN, BOOL *ENO
-#define EN_ENO EN, ENO
-
-#define TEST_EN(TYPENAME)\
-  if (!EN) {\
-    if (ENO != NULL)\
-      *ENO = __BOOL_LITERAL(FALSE);\
-    return __INIT_##TYPENAME;\
-  }\
-  else if (ENO != NULL)\
-    *ENO = __BOOL_LITERAL(TRUE);
-
-#define TEST_EN_COND(TYPENAME, COND)\
-  if (!EN || (COND)) {\
-    if (ENO != NULL)\
-      *ENO = __BOOL_LITERAL(FALSE);\
-    return __INIT_##TYPENAME;\
-  }\
-  else if (ENO != NULL)\
-    *ENO = __BOOL_LITERAL(TRUE);
-
+#ifdef DISABLE_EN_ENO_PARAMETERS
+
+  /* Do _not_ generate the EN and ENO parameters! */
+  #define EN_ENO_PARAMS
+  #define EN_ENO
+
+  #define TEST_EN(TYPENAME)
+  #define TEST_EN_COND(TYPENAME, COND)
+
+#else
+    
+  /* _Do_ generate the EN and ENO parameters! */
+  #define EN_ENO_PARAMS BOOL EN, BOOL *ENO,
+  #define EN_ENO EN, ENO,
+
+  #define TEST_EN(TYPENAME)\
+    if (!EN) {\
+      if (ENO != NULL)\
+        *ENO = __BOOL_LITERAL(FALSE);\
+      return __INIT_##TYPENAME;\
+    }\
+    else if (ENO != NULL)\
+      *ENO = __BOOL_LITERAL(TRUE);
+
+  #define TEST_EN_COND(TYPENAME, COND)\
+    if (!EN || (COND)) {\
+      if (ENO != NULL)\
+        *ENO = __BOOL_LITERAL(FALSE);\
+      return __INIT_##TYPENAME;\
+    }\
+    else if (ENO != NULL)\
+      *ENO = __BOOL_LITERAL(TRUE);
+    
+#endif
   
   
 /*****************************************/  
@@ -113,14 +125,14 @@
 /*****************************************/  
 
 #define __convert_type(from_TYPENAME,to_TYPENAME, oper) \
-static inline to_TYPENAME from_TYPENAME##_TO_##to_TYPENAME(EN_ENO_PARAMS, from_TYPENAME op){\
+static inline to_TYPENAME from_TYPENAME##_TO_##to_TYPENAME(EN_ENO_PARAMS from_TYPENAME op){\
   TEST_EN(to_TYPENAME)\
   return (to_TYPENAME)oper(op);\
 }
 
 /******** [ANY_NUM | ANY_NBIT]_TO_BOOL   ************/
 #define __convert_num_to_bool(TYPENAME) \
-static inline BOOL TYPENAME##_TO_BOOL(EN_ENO_PARAMS, TYPENAME op){\
+static inline BOOL TYPENAME##_TO_BOOL(EN_ENO_PARAMS TYPENAME op){\
   TEST_EN(BOOL)\
   return op == 0 ? 0 : 1;\
 }
@@ -129,7 +141,7 @@
 
 /******** [TIME | ANY_DATE]_TO_BOOL   ************/
 #define __convert_time_to_bool(TYPENAME) \
-static inline BOOL TYPENAME##_TO_BOOL(EN_ENO_PARAMS, TYPENAME op){\
+static inline BOOL TYPENAME##_TO_BOOL(EN_ENO_PARAMS TYPENAME op){\
   TEST_EN(BOOL)\
   return op.tv_sec == 0 && op.tv_nsec == 0 ? 0 : 1;\
 }
@@ -211,13 +223,13 @@
 /******** [ANY_DATE]_TO_[ANY_DATE | TIME]   ************/ 
 /* Not supported: DT_TO_TIME */
 __convert_type(DT, DATE,  __date_and_time_to_date)
-static inline DATE DATE_AND_TIME_TO_DATE(EN_ENO_PARAMS, DT op){
-	return DT_TO_DATE(EN_ENO, op);
+static inline DATE DATE_AND_TIME_TO_DATE(EN_ENO_PARAMS DT op){
+	return DT_TO_DATE(EN_ENO op);
 }
 __convert_type(DT, DT,    __move_DT)
 __convert_type(DT, TOD,   __date_and_time_to_time_of_day)
-static inline DATE DATE_AND_TIME_TO_TIME_OF_DAY(EN_ENO_PARAMS, DT op){
-	return DT_TO_TOD(EN_ENO, op);
+static inline DATE DATE_AND_TIME_TO_TIME_OF_DAY(EN_ENO_PARAMS DT op){
+	return DT_TO_TOD(EN_ENO op);
 }
 /* Not supported: DATE_TO_TIME */
 __convert_type(DATE, DATE, __move_DATE)
@@ -296,7 +308,7 @@
 
 /********   TRUNC   ************/ 
 #define __iec_(to_TYPENAME,from_TYPENAME) \
-static inline to_TYPENAME TRUNC__##to_TYPENAME##__##from_TYPENAME(EN_ENO_PARAMS, from_TYPENAME op){\
+static inline to_TYPENAME TRUNC__##to_TYPENAME##__##from_TYPENAME(EN_ENO_PARAMS from_TYPENAME op){\
   TEST_EN(to_TYPENAME)\
   return (to_TYPENAME)__move_##to_TYPENAME(op);\
 }
@@ -306,12 +318,12 @@
 
 /********   _TO_BCD   ************/
 #define __iec_(to_TYPENAME,from_TYPENAME) \
-static inline to_TYPENAME from_TYPENAME##_TO_BCD_##to_TYPENAME(EN_ENO_PARAMS, from_TYPENAME op){\
+static inline to_TYPENAME from_TYPENAME##_TO_BCD_##to_TYPENAME(EN_ENO_PARAMS from_TYPENAME op){\
   TEST_EN(to_TYPENAME)\
   return (to_TYPENAME)__uint_to_bcd(op);\
 }\
-static inline to_TYPENAME from_TYPENAME##_TO_BCD__##to_TYPENAME##__##from_TYPENAME(EN_ENO_PARAMS, from_TYPENAME op){\
-  return from_TYPENAME##_TO_BCD_##to_TYPENAME(EN_ENO, op);\
+static inline to_TYPENAME from_TYPENAME##_TO_BCD__##to_TYPENAME##__##from_TYPENAME(EN_ENO_PARAMS from_TYPENAME op){\
+  return from_TYPENAME##_TO_BCD_##to_TYPENAME(EN_ENO op);\
 }
 __ANY_UINT(__to_anynbit_)
 #undef __iec_
@@ -319,12 +331,12 @@
 
 /********   BCD_TO_   ************/
 #define __iec_(to_TYPENAME,from_TYPENAME) \
-static inline to_TYPENAME from_TYPENAME##_BCD_TO_##to_TYPENAME(EN_ENO_PARAMS, from_TYPENAME op){\
+static inline to_TYPENAME from_TYPENAME##_BCD_TO_##to_TYPENAME(EN_ENO_PARAMS from_TYPENAME op){\
   TEST_EN_COND(to_TYPENAME, __test_bcd(op))\
   return (to_TYPENAME)__bcd_to_uint(op);\
 }\
-static inline to_TYPENAME BCD_TO_##to_TYPENAME##__##to_TYPENAME##__##from_TYPENAME(EN_ENO_PARAMS, from_TYPENAME op){\
-  return from_TYPENAME##_BCD_TO_##to_TYPENAME(EN_ENO, op);\
+static inline to_TYPENAME BCD_TO_##to_TYPENAME##__##to_TYPENAME##__##from_TYPENAME(EN_ENO_PARAMS from_TYPENAME op){\
+  return from_TYPENAME##_BCD_TO_##to_TYPENAME(EN_ENO op);\
 }
 __ANY_NBIT(__to_anyuint_)
 #undef __iec_
@@ -362,13 +374,13 @@
 
 #define __numeric(fname,TYPENAME, FUNC) \
 /* explicitly typed function */\
-static inline TYPENAME fname##TYPENAME(EN_ENO_PARAMS, TYPENAME op){\
+static inline TYPENAME fname##TYPENAME(EN_ENO_PARAMS TYPENAME op){\
   TEST_EN(TYPENAME)\
   return FUNC(op);\
 }\
 /* overloaded function */\
-static inline TYPENAME fname##_##TYPENAME##__##TYPENAME(EN_ENO_PARAMS, TYPENAME op) {\
-  return fname##TYPENAME(EN_ENO, op);\
+static inline TYPENAME fname##_##TYPENAME##__##TYPENAME(EN_ENO_PARAMS TYPENAME op) {\
+  return fname##TYPENAME(EN_ENO op);\
 }
 
 /******************************************************************/
@@ -380,26 +392,26 @@
   /**************/
 #define __abs_signed(TYPENAME) \
 /* explicitly typed function */\
-static inline TYPENAME ABS_##TYPENAME(EN_ENO_PARAMS, TYPENAME op){\
+static inline TYPENAME ABS_##TYPENAME(EN_ENO_PARAMS TYPENAME op){\
   TEST_EN(TYPENAME)\
   if (op < 0)\
     return -op;\
   return op;\
 }\
 /* overloaded function */\
-static inline TYPENAME ABS__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS, TYPENAME op) {\
-  return ABS_##TYPENAME(EN_ENO, op);\
+static inline TYPENAME ABS__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS TYPENAME op) {\
+  return ABS_##TYPENAME(EN_ENO op);\
 }
 
 #define __abs_unsigned(TYPENAME) \
 /* explicitly typed function */\
-static inline TYPENAME ABS_##TYPENAME(EN_ENO_PARAMS, TYPENAME op){\
+static inline TYPENAME ABS_##TYPENAME(EN_ENO_PARAMS TYPENAME op){\
   TEST_EN(TYPENAME)\
   return op;\
 }\
 /* overloaded function */\
-static inline TYPENAME ABS__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS, TYPENAME op) {\
-  return ABS_##TYPENAME(EN_ENO, op);\
+static inline TYPENAME ABS__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS TYPENAME op) {\
+  return ABS_##TYPENAME(EN_ENO op);\
 }
 
 __ANY_REAL(__abs_signed)
@@ -480,7 +492,7 @@
 /*****************************************************/
 
 #define __arith_expand(fname,TYPENAME, OP)\
-static inline TYPENAME fname(EN_ENO_PARAMS, UINT param_count, TYPENAME op1, ...){\
+static inline TYPENAME fname(EN_ENO_PARAMS UINT param_count, TYPENAME op1, ...){\
   va_list ap;\
   UINT i;\
   TEST_EN(TYPENAME)\
@@ -497,13 +509,13 @@
 
 #define __arith_static(fname,TYPENAME, OP)\
 /* explicitly typed function */\
-static inline TYPENAME fname##TYPENAME(EN_ENO_PARAMS, TYPENAME op1, TYPENAME op2){\
+static inline TYPENAME fname##TYPENAME(EN_ENO_PARAMS TYPENAME op1, TYPENAME op2){\
   TEST_EN(TYPENAME)\
   return op1 OP op2;\
 }\
 /* overloaded function */\
-static inline TYPENAME fname##_##TYPENAME##__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS, TYPENAME op1, TYPENAME op2){\
-  return fname##TYPENAME(EN_ENO, op1, op2);\
+static inline TYPENAME fname##_##TYPENAME##__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS TYPENAME op1, TYPENAME op2){\
+  return fname##TYPENAME(EN_ENO op1, op2);\
 }
 
   /**************/
@@ -536,13 +548,13 @@
   /**************/
 #define __div(TYPENAME)\
 /* The explicitly typed standard functions */\
-static inline TYPENAME DIV_##TYPENAME(EN_ENO_PARAMS, TYPENAME op1, TYPENAME op2){\
+static inline TYPENAME DIV_##TYPENAME(EN_ENO_PARAMS TYPENAME op1, TYPENAME op2){\
   TEST_EN_COND(TYPENAME, op2 == 0)\
   return op1 / op2;\
 }\
 /* The overloaded standard functions */\
-static inline TYPENAME DIV__##TYPENAME##__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS, TYPENAME op1, TYPENAME op2){\
-  return DIV_##TYPENAME(EN_ENO, op1, op2);\
+static inline TYPENAME DIV__##TYPENAME##__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS TYPENAME op1, TYPENAME op2){\
+  return DIV_##TYPENAME(EN_ENO op1, op2);\
 }
 __ANY_NUM(__div)
 
@@ -552,14 +564,14 @@
   /**************/
 #define __mod(TYPENAME)\
 /* The explicitly typed standard functions */\
-static inline TYPENAME MOD_##TYPENAME(EN_ENO_PARAMS, TYPENAME op1, TYPENAME op2){\
+static inline TYPENAME MOD_##TYPENAME(EN_ENO_PARAMS TYPENAME op1, TYPENAME op2){\
   TEST_EN(TYPENAME)\
   if (op2 == 0) return 0;\
   return op1 % op2;\
 }\
 /* The overloaded standard functions */\
-static inline TYPENAME MOD__##TYPENAME##__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS, TYPENAME op1, TYPENAME op2){\
-  return MOD_##TYPENAME(EN_ENO, op1, op2);\
+static inline TYPENAME MOD__##TYPENAME##__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS TYPENAME op1, TYPENAME op2){\
+  return MOD_##TYPENAME(EN_ENO op1, op2);\
 }
 __ANY_INT(__mod)
 
@@ -569,9 +581,9 @@
 /* overloaded function */
 #define __iec_(in1_TYPENAME,in2_TYPENAME) \
 static inline in1_TYPENAME EXPT__##in1_TYPENAME##__##in1_TYPENAME##__##in2_TYPENAME\
-  (EN_ENO_PARAMS, in1_TYPENAME IN1, in2_TYPENAME IN2){\
+  (EN_ENO_PARAMS in1_TYPENAME IN1, in2_TYPENAME IN2){\
   TEST_EN(in1_TYPENAME)\
-  return pow(IN1, IN2);\
+  return __expt(IN1, IN2);\
 }
 #define __in1_anyreal_(in2_TYPENAME)   __ANY_REAL_1(__iec_,in2_TYPENAME)
 __ANY_NUM(__in1_anyreal_)
@@ -584,7 +596,7 @@
   /***************/
 /* The explicitly typed standard functions */
 #define __iec_(TYPENAME)\
-static inline TYPENAME MOVE_##TYPENAME(EN_ENO_PARAMS, TYPENAME op1){\
+static inline TYPENAME MOVE_##TYPENAME(EN_ENO_PARAMS TYPENAME op1){\
   TEST_EN(TYPENAME)\
   return op1;\
 }
@@ -593,7 +605,7 @@
 
 /* Overloaded function */
 #define __iec_(TYPENAME)\
-static inline TYPENAME MOVE__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS, TYPENAME op1){\
+static inline TYPENAME MOVE__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS TYPENAME op1){\
   TEST_EN(TYPENAME)\
   return op1;\
 }
@@ -621,7 +633,7 @@
 #define __in1_anynbit_(in2_TYPENAME)   __ANY_NBIT_1(__iec_,in2_TYPENAME)
 
 #define __shift_(fname, in1_TYPENAME, in2_TYPENAME, OP)\
-static inline in1_TYPENAME fname(EN_ENO_PARAMS, in1_TYPENAME IN, in2_TYPENAME N) {\
+static inline in1_TYPENAME fname(EN_ENO_PARAMS in1_TYPENAME IN, in2_TYPENAME N) {\
   TEST_EN(in1_TYPENAME)\
   return IN OP N;\
 }
@@ -631,7 +643,7 @@
   /**************/
 #define __iec_(TYPENAME) \
 /* Overloaded function */\
-static inline BOOL SHL__BOOL__##TYPENAME(EN_ENO_PARAMS, BOOL IN, TYPENAME N) { \
+static inline BOOL SHL__BOOL__##TYPENAME(EN_ENO_PARAMS BOOL IN, TYPENAME N) { \
   TEST_EN(BOOL);\
   return (N==0)? IN : __INIT_BOOL;  /* shifting by N>1 will always introduce a 0 */\
 }
@@ -650,7 +662,7 @@
   /**************/
 #define __iec_(TYPENAME) \
 /* Overloaded function */\
-static inline BOOL SHR__BOOL__##TYPENAME(EN_ENO_PARAMS, BOOL IN, TYPENAME N) { \
+static inline BOOL SHR__BOOL__##TYPENAME(EN_ENO_PARAMS BOOL IN, TYPENAME N) { \
   TEST_EN(BOOL);\
   return (N==0)? IN : __INIT_BOOL;  /* shifting by N>1 will always introduce a 0 */\
 }
@@ -669,7 +681,7 @@
   /**************/
 #define __iec_(TYPENAME) \
 /* Overloaded function */\
-static inline BOOL ROR__BOOL__##TYPENAME(EN_ENO_PARAMS, BOOL IN, TYPENAME N) { \
+static inline BOOL ROR__BOOL__##TYPENAME(EN_ENO_PARAMS BOOL IN, TYPENAME N) { \
   TEST_EN(BOOL);\
   return IN; /* rotating a single bit by any value N will not change that bit! */\
 }
@@ -678,7 +690,7 @@
 
 
 #define __iec_(in1_TYPENAME,in2_TYPENAME) \
-static inline in1_TYPENAME ROR__##in1_TYPENAME##__##in1_TYPENAME##__##in2_TYPENAME(EN_ENO_PARAMS, in1_TYPENAME IN, in2_TYPENAME N){\
+static inline in1_TYPENAME ROR__##in1_TYPENAME##__##in1_TYPENAME##__##in2_TYPENAME(EN_ENO_PARAMS in1_TYPENAME IN, in2_TYPENAME N){\
   TEST_EN(in1_TYPENAME)\
   N %= 8*sizeof(in1_TYPENAME);\
   return (IN >> N) | (IN << (8*sizeof(in1_TYPENAME)-N));\
@@ -692,7 +704,7 @@
   /**************/
 #define __iec_(TYPENAME) \
 /* Overloaded function */\
-static inline BOOL ROL__BOOL__##TYPENAME(EN_ENO_PARAMS, BOOL IN, TYPENAME N) { \
+static inline BOOL ROL__BOOL__##TYPENAME(EN_ENO_PARAMS BOOL IN, TYPENAME N) { \
   TEST_EN(BOOL);\
   return IN; /* rotating a single bit by any value N will not change that bit! */\
 }
@@ -701,7 +713,7 @@
 
 
 #define __iec_(in1_TYPENAME,in2_TYPENAME) \
-static inline in1_TYPENAME ROL__##in1_TYPENAME##__##in1_TYPENAME##__##in2_TYPENAME(EN_ENO_PARAMS, in1_TYPENAME IN, in2_TYPENAME N){\
+static inline in1_TYPENAME ROL__##in1_TYPENAME##__##in1_TYPENAME##__##in2_TYPENAME(EN_ENO_PARAMS in1_TYPENAME IN, in2_TYPENAME N){\
   TEST_EN(in1_TYPENAME)\
   N %= 8*sizeof(in1_TYPENAME);\
   return (IN << N) | (IN >> (8*sizeof(in1_TYPENAME)-N));\
@@ -743,7 +755,7 @@
   /*     XOR    */
   /**************/
 #define __xorbool_expand(fname) \
-static inline BOOL fname(EN_ENO_PARAMS, UINT param_count, BOOL op1, ...){ \
+static inline BOOL fname(EN_ENO_PARAMS UINT param_count, BOOL op1, ...){ \
   va_list ap; \
   UINT i; \
   TEST_EN(BOOL) \
@@ -773,20 +785,20 @@
   /*     NOT    */
   /**************/
 /* The explicitly typed standard functions */
-static inline BOOL NOT_BOOL(EN_ENO_PARAMS, BOOL op1){
+static inline BOOL NOT_BOOL(EN_ENO_PARAMS BOOL op1){
   TEST_EN(BOOL)
   return !op1;
 }
 
 /* Overloaded function */
-static inline BOOL NOT__BOOL__BOOL(EN_ENO_PARAMS, BOOL op1){
+static inline BOOL NOT__BOOL__BOOL(EN_ENO_PARAMS BOOL op1){
   TEST_EN(BOOL)
   return !op1;
 }
 
 /* The explicitly typed standard functions */
 #define __iec_(TYPENAME)\
-static inline TYPENAME NOT_##TYPENAME(EN_ENO_PARAMS, TYPENAME op1){\
+static inline TYPENAME NOT_##TYPENAME(EN_ENO_PARAMS TYPENAME op1){\
   TEST_EN(TYPENAME)\
   return ~op1;\
 }
@@ -795,7 +807,7 @@
 
 /* Overloaded function */
 #define __iec_(TYPENAME)\
-static inline TYPENAME NOT__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS, TYPENAME op1){\
+static inline TYPENAME NOT__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS TYPENAME op1){\
   TEST_EN(TYPENAME)\
   return ~op1;\
 }
@@ -824,7 +836,7 @@
 
 /* The explicitly typed standard functions */
 #define __iec_(TYPENAME)\
-static inline TYPENAME SEL_##TYPENAME(EN_ENO_PARAMS, BOOL G, TYPENAME op0, TYPENAME op1){\
+static inline TYPENAME SEL_##TYPENAME(EN_ENO_PARAMS BOOL G, TYPENAME op0, TYPENAME op1){\
   TEST_EN(TYPENAME)\
   return G ? op1 : op0;\
 }
@@ -833,7 +845,7 @@
 
 /* Overloaded function */
 #define __iec_(TYPENAME)\
-static inline TYPENAME SEL__##TYPENAME##__BOOL__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS, BOOL G, TYPENAME op0, TYPENAME op1){\
+static inline TYPENAME SEL__##TYPENAME##__BOOL__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS BOOL G, TYPENAME op0, TYPENAME op1){\
   TEST_EN(TYPENAME)\
   return G ? op1 : op0;\
 }
@@ -846,7 +858,7 @@
     /**************/
 
 #define __extrem_(fname,TYPENAME, COND) \
-static inline TYPENAME fname(EN_ENO_PARAMS, UINT param_count, TYPENAME op1, ...){\
+static inline TYPENAME fname(EN_ENO_PARAMS UINT param_count, TYPENAME op1, ...){\
   va_list ap;\
   UINT i;\
   TEST_EN(TYPENAME)\
@@ -914,12 +926,12 @@
 /* Limit for numerical data types */
 #define __iec_(TYPENAME)\
 /* The explicitly typed standard functions */\
-static inline TYPENAME LIMIT_##TYPENAME(EN_ENO_PARAMS, TYPENAME MN, TYPENAME IN, TYPENAME MX){\
+static inline TYPENAME LIMIT_##TYPENAME(EN_ENO_PARAMS TYPENAME MN, TYPENAME IN, TYPENAME MX){\
   TEST_EN(TYPENAME)\
   return IN > MN ? IN < MX ? IN : MX : MN;\
 }\
 /* Overloaded function */\
-static inline TYPENAME LIMIT__##TYPENAME##__##TYPENAME##__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS, TYPENAME MN, TYPENAME IN, TYPENAME MX){\
+static inline TYPENAME LIMIT__##TYPENAME##__##TYPENAME##__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS TYPENAME MN, TYPENAME IN, TYPENAME MX){\
   TEST_EN(TYPENAME)\
   return IN > MN ? IN < MX ? IN : MX : MN;\
 }
@@ -931,14 +943,14 @@
 /* Limit for time data types */	
 #define __iec_(TYPENAME)\
 /* The explicitly typed standard functions */\
-static inline TYPENAME LIMIT_##TYPENAME(EN_ENO_PARAMS, TYPENAME MN, TYPENAME IN, TYPENAME MX){\
+static inline TYPENAME LIMIT_##TYPENAME(EN_ENO_PARAMS TYPENAME MN, TYPENAME IN, TYPENAME MX){\
     TEST_EN(TYPENAME)\
     return __time_cmp(IN, MN) > 0 ? /* IN>MN ?*/\
            __time_cmp(IN, MX) < 0 ? /* IN<MX ?*/\
            IN : MX : MN;\
 }\
 /* Overloaded function */\
-static inline TYPENAME LIMIT__##TYPENAME##__##TYPENAME##__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS, TYPENAME MN, TYPENAME IN, TYPENAME MX){\
+static inline TYPENAME LIMIT__##TYPENAME##__##TYPENAME##__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS TYPENAME MN, TYPENAME IN, TYPENAME MX){\
     TEST_EN(TYPENAME)\
     return __time_cmp(IN, MN) > 0 ? /* IN>MN ?*/\
            __time_cmp(IN, MX) < 0 ? /* IN<MX ?*/\
@@ -951,13 +963,13 @@
 
 /* Limit for string data types */	
 /* The explicitly typed standard functions */
-static inline STRING LIMIT_STRING(EN_ENO_PARAMS, STRING MN, STRING IN, STRING MX){
+static inline STRING LIMIT_STRING(EN_ENO_PARAMS STRING MN, STRING IN, STRING MX){
     TEST_EN(STRING)
     return __STR_CMP(IN, MN) > 0 ? __STR_CMP(IN, MX) < 0 ? IN : MX : MN;
 }
 
 /* Overloaded function */
-static inline STRING LIMIT__STRING__STRING__STRING__STRING(EN_ENO_PARAMS, STRING MN, STRING IN, STRING MX){
+static inline STRING LIMIT__STRING__STRING__STRING__STRING(EN_ENO_PARAMS STRING MN, STRING IN, STRING MX){
     TEST_EN(STRING)
     return __STR_CMP(IN, MN) > 0 ? __STR_CMP(IN, MX) < 0 ? IN : MX : MN;
 }
@@ -972,7 +984,7 @@
 /* The explicitly typed standard functions */
 #define __in1_anyint_(in2_TYPENAME)   __ANY_INT_1(__iec_,in2_TYPENAME)
 #define __iec_(in1_TYPENAME,in2_TYPENAME) \
-static inline in2_TYPENAME MUX__##in2_TYPENAME##__##in1_TYPENAME##__##in2_TYPENAME(EN_ENO_PARAMS, in1_TYPENAME K, UINT param_count, ...){\
+static inline in2_TYPENAME MUX__##in2_TYPENAME##__##in1_TYPENAME##__##in2_TYPENAME(EN_ENO_PARAMS in1_TYPENAME K, UINT param_count, ...){\
   va_list ap;\
   UINT i;\
   in2_TYPENAME tmp;\
@@ -1005,7 +1017,7 @@
 /******************************************/
 
 #define __compare_(fname,TYPENAME, COND) \
-static inline BOOL fname(EN_ENO_PARAMS, UINT param_count, TYPENAME op1, ...){\
+static inline BOOL fname(EN_ENO_PARAMS UINT param_count, TYPENAME op1, ...){\
   va_list ap;\
   UINT i;\
   TEST_EN(BOOL)\
@@ -1158,19 +1170,19 @@
     /*     NE     */
     /**************/
 #define __ne_num(fname, TYPENAME) \
-static inline BOOL fname(EN_ENO_PARAMS, TYPENAME op1, TYPENAME op2){\
+static inline BOOL fname(EN_ENO_PARAMS TYPENAME op1, TYPENAME op2){\
   TEST_EN(BOOL)\
   return op1 != op2 ? 1 : 0;\
 }
 
 #define __ne_time(fname, TYPENAME) \
-static inline BOOL fname(EN_ENO_PARAMS, TYPENAME op1, TYPENAME op2){\
+static inline BOOL fname(EN_ENO_PARAMS TYPENAME op1, TYPENAME op2){\
   TEST_EN(BOOL)\
   return __time_cmp(op1, op2) != 0 ? 1 : 0;\
 }
 
 #define __ne_string(fname, TYPENAME) \
-static inline BOOL fname(EN_ENO_PARAMS, TYPENAME op1, TYPENAME op2){\
+static inline BOOL fname(EN_ENO_PARAMS TYPENAME op1, TYPENAME op2){\
   TEST_EN(BOOL)\
   return __STR_CMP(op1, op2) != 0 ? 1 : 0;\
 }
@@ -1225,7 +1237,7 @@
 
 /* A function, with 1 input paramter, implementing a generic OPERATION */
 #define __genoper_1p_(fname,ret_TYPENAME, par_TYPENAME, OPERATION) \
-static inline ret_TYPENAME fname(EN_ENO_PARAMS, par_TYPENAME par1){\
+static inline ret_TYPENAME fname(EN_ENO_PARAMS par_TYPENAME par1){\
   TEST_EN(ret_TYPENAME)\
   return (ret_TYPENAME)OPERATION(par1);\
 }
@@ -1240,7 +1252,7 @@
     /****************/
 
 #define __left(TYPENAME) \
-static inline STRING LEFT__STRING__STRING__##TYPENAME(EN_ENO_PARAMS, STRING IN, TYPENAME L){\
+static inline STRING LEFT__STRING__STRING__##TYPENAME(EN_ENO_PARAMS STRING IN, TYPENAME L){\
     STRING res;\
     TEST_EN_COND(STRING, L < 0)\
     res = __INIT_STRING;\
@@ -1257,7 +1269,7 @@
     /*****************/
 
 #define __right(TYPENAME) \
-static inline STRING RIGHT__STRING__STRING__##TYPENAME(EN_ENO_PARAMS, STRING IN, TYPENAME L){\
+static inline STRING RIGHT__STRING__STRING__##TYPENAME(EN_ENO_PARAMS STRING IN, TYPENAME L){\
   STRING res;\
   TEST_EN_COND(STRING, L < 0)\
   res = __INIT_STRING;\
@@ -1274,7 +1286,7 @@
     /***************/
 
 #define __mid(TYPENAME) \
-static inline STRING MID__STRING__STRING__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS, STRING IN, TYPENAME L, TYPENAME P){\
+static inline STRING MID__STRING__STRING__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS STRING IN, TYPENAME L, TYPENAME P){\
   STRING res;\
   TEST_EN_COND(STRING, L < 0 || P < 0)\
   res = __INIT_STRING;\
@@ -1293,7 +1305,7 @@
     /*     CONCAT     */
     /******************/
 
-static inline STRING CONCAT(EN_ENO_PARAMS, UINT param_count, ...){
+static inline STRING CONCAT(EN_ENO_PARAMS UINT param_count, ...){
   UINT i;
   STRING res;
   va_list ap;
@@ -1344,7 +1356,7 @@
 }
 
 #define __iec_(TYPENAME) \
-static inline STRING INSERT__STRING__STRING__STRING__##TYPENAME(EN_ENO_PARAMS, STRING str1, STRING str2, TYPENAME P){\
+static inline STRING INSERT__STRING__STRING__STRING__##TYPENAME(EN_ENO_PARAMS STRING str1, STRING str2, TYPENAME P){\
   TEST_EN_COND(STRING, P < 0)\
   return (STRING)__insert(str1,str2,(__strlen_t)P);\
 }
@@ -1375,7 +1387,7 @@
 }
 
 #define __iec_(TYPENAME) \
-static inline STRING DELETE__STRING__STRING__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS, STRING str, TYPENAME L, TYPENAME P){\
+static inline STRING DELETE__STRING__STRING__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS STRING str, TYPENAME L, TYPENAME P){\
   TEST_EN_COND(STRING, L < 0 || P < 0)\
   return (STRING)__delete(str,(__strlen_t)L,(__strlen_t)P);\
 }
@@ -1416,7 +1428,7 @@
 }
 
 #define __iec_(TYPENAME) \
-static inline STRING REPLACE__STRING__STRING__STRING__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS, STRING str1, STRING str2, TYPENAME L, TYPENAME P){\
+static inline STRING REPLACE__STRING__STRING__STRING__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS STRING str1, STRING str2, TYPENAME L, TYPENAME P){\
   TEST_EN_COND(STRING, L < 0 || P < 0)\
   return (STRING)__replace(str1,str2,(__strlen_t)L,(__strlen_t)P);\
 }
@@ -1444,7 +1456,7 @@
 }
 
 #define __iec_(TYPENAME) \
-static inline TYPENAME FIND__##TYPENAME##__STRING__STRING(EN_ENO_PARAMS, STRING str1, STRING str2){\
+static inline TYPENAME FIND__##TYPENAME##__STRING__STRING(EN_ENO_PARAMS STRING str1, STRING str2){\
   TEST_EN(TYPENAME)\
   return (TYPENAME)__pfind(&str1,&str2);\
 }
@@ -1464,47 +1476,47 @@
 /**************************************/
 
 
-static inline TIME ADD_TIME(EN_ENO_PARAMS, TIME IN1, TIME IN2){
+static inline TIME ADD_TIME(EN_ENO_PARAMS TIME IN1, TIME IN2){
   TEST_EN(TIME)
   return __time_add(IN1, IN2);
 }
 
-static inline TOD ADD_TOD_TIME(EN_ENO_PARAMS, TOD IN1, TIME IN2){
+static inline TOD ADD_TOD_TIME(EN_ENO_PARAMS TOD IN1, TIME IN2){
   TEST_EN(TOD)
   return __time_add(IN1, IN2);
 }
 
-static inline DT ADD_DT_TIME(EN_ENO_PARAMS, DT IN1, TIME IN2){
+static inline DT ADD_DT_TIME(EN_ENO_PARAMS DT IN1, TIME IN2){
   TEST_EN(DT)
   return __time_add(IN1, IN2);
 }
 
-static inline TIME SUB_TIME(EN_ENO_PARAMS, TIME IN1, TIME IN2){
+static inline TIME SUB_TIME(EN_ENO_PARAMS TIME IN1, TIME IN2){
   TEST_EN(TIME)
   return __time_sub(IN1, IN2);
 }
 
-static inline TIME SUB_DATE_DATE(EN_ENO_PARAMS, DATE IN1, DATE IN2){
+static inline TIME SUB_DATE_DATE(EN_ENO_PARAMS DATE IN1, DATE IN2){
   TEST_EN(TIME)
   return __time_sub(IN1, IN2);
 }
 
-static inline TOD SUB_TOD_TIME(EN_ENO_PARAMS, TOD IN1, TIME IN2){
+static inline TOD SUB_TOD_TIME(EN_ENO_PARAMS TOD IN1, TIME IN2){
   TEST_EN(TOD)
   return __time_sub(IN1, IN2);
 }
 
-static inline TIME SUB_TOD_TOD(EN_ENO_PARAMS, TOD IN1, TOD IN2){
+static inline TIME SUB_TOD_TOD(EN_ENO_PARAMS TOD IN1, TOD IN2){
   TEST_EN(TIME)
   return __time_sub(IN1, IN2);
 }
 
-static inline DT SUB_DT_TIME(EN_ENO_PARAMS, DT IN1, TIME IN2){
+static inline DT SUB_DT_TIME(EN_ENO_PARAMS DT IN1, TIME IN2){
   TEST_EN(DT)
   return __time_sub(IN1, IN2);
 }
 
-static inline TIME SUB_DT_DT(EN_ENO_PARAMS, DT IN1, DT IN2){
+static inline TIME SUB_DT_DT(EN_ENO_PARAMS DT IN1, DT IN2){
   TEST_EN(TIME)
   return __time_sub(IN1, IN2);
 }
@@ -1512,7 +1524,7 @@
 
 /***  MULTIME  ***/
 #define __iec_(TYPENAME)\
-static inline TIME MULTIME__TIME__TIME__##TYPENAME(EN_ENO_PARAMS, TIME IN1, TYPENAME IN2){\
+static inline TIME MULTIME__TIME__TIME__##TYPENAME(EN_ENO_PARAMS TIME IN1, TYPENAME IN2){\
   TEST_EN(TIME)\
   return __time_mul(IN1, (LREAL)IN2);\
 }
@@ -1521,7 +1533,7 @@
 
 /***  MUL  ***/
 #define __iec_(TYPENAME)\
-static inline TIME MUL__TIME__TIME__##TYPENAME(EN_ENO_PARAMS, TIME IN1, TYPENAME IN2){\
+static inline TIME MUL__TIME__TIME__##TYPENAME(EN_ENO_PARAMS TIME IN1, TYPENAME IN2){\
   TEST_EN(TIME)\
   return __time_mul(IN1, (LREAL)IN2);\
 }
@@ -1530,7 +1542,7 @@
 
 /***  DIVTIME  ***/
 #define __iec_(TYPENAME)\
-static inline TIME DIVTIME__TIME__TIME__##TYPENAME(EN_ENO_PARAMS, TIME IN1, TYPENAME IN2){\
+static inline TIME DIVTIME__TIME__TIME__##TYPENAME(EN_ENO_PARAMS TIME IN1, TYPENAME IN2){\
   TEST_EN(TIME)\
   return __time_div(IN1, (LREAL)IN2);\
 }
@@ -1539,7 +1551,7 @@
 
 /***  DIV  ***/
 #define __iec_(TYPENAME)\
-static inline TIME DIV__TIME__TIME__##TYPENAME(EN_ENO_PARAMS, TIME IN1, TYPENAME IN2){\
+static inline TIME DIV__TIME__TIME__##TYPENAME(EN_ENO_PARAMS TIME IN1, TYPENAME IN2){\
   TEST_EN(TIME)\
   return __time_div(IN1, (LREAL)IN2);\
 }
@@ -1547,7 +1559,7 @@
 #undef __iec_
 
 /*** CONCAT_DATE_TOD ***/
-static inline DT CONCAT_DATE_TOD(EN_ENO_PARAMS, DATE IN1, TOD IN2){
+static inline DT CONCAT_DATE_TOD(EN_ENO_PARAMS DATE IN1, TOD IN2){
   TEST_EN(DT)
   return __time_add(IN1, IN2);
 }
--- a/lib/C/iec_std_lib.h	Sat May 07 21:17:49 2016 +0100
+++ b/lib/C/iec_std_lib.h	Sun May 08 20:01:15 2016 +0100
@@ -162,6 +162,16 @@
   /*exit(1);*/
 }
 
+
+/*******************/
+/* Math Operations */
+/*******************/
+
+static inline double __expt(double in1, double in2) {
+  return pow(in1, in2);
+}
+
+
 /*******************************/
 /* Time normalization function */
 /*******************************/
@@ -735,8 +745,12 @@
 
 
 
-
 #include "iec_std_functions.h"
-#include "iec_std_FB.h"
+
+#ifdef  DISABLE_EN_ENO_PARAMETERS
+  #include "iec_std_FB_no_ENENO.h"
+#else
+  #include "iec_std_FB.h"
+#endif
 
 #endif /* _IEC_STD_LIB_H */
--- a/main.cc	Sat May 07 21:17:49 2016 +0100
+++ b/main.cc	Sun May 08 20:01:15 2016 +0100
@@ -116,10 +116,12 @@
   printf(" -p : allow use of forward references                (a non-standard extension?)\n");  
   printf(" -l : use a relaxed datatype equivalence model       (a non-standard extension?)\n");  
   printf(" -s : allow use of safe datatypes (SAFEBOOL, etc.)   (defined in PLCOpen Safety)\n"); // PLCopen TC5 "Safety Software Technical Specification - Part 1" v1.0
+  printf(" -n : allow use of nested comments                   (an IEC 61131-3 v3 feature)\n");
   printf(" -r : allow use of references (REF_TO, REF, ^, NULL) (an IEC 61131-3 v3 feature)\n");
   printf(" -R : allow use of REF_TO ANY datatypes              (a non-standard extension!)\n");
   printf("        as well as REF_TO in ARRAYs and STRUCTs      (a non-standard extension!)\n");
   printf(" -a : allow use of non-literals in array size limits (a non-standard extension!)\n");
+  printf(" -e : disable generation of implicit EN and ENO parameters.\n");
   printf(" -c : create conversion functions for enumerated data types\n");
   printf(" -O : options for output (code generation) stage. Available options for %s are...\n", cmd);
   stage4_print_options();
@@ -141,14 +143,15 @@
   int path_len;
 
   /* Default values for the command line options... */
-  runtime_options.pre_parsing             = false; /* allow use of forward references (run pre-parsing phase before the definitive parsing phase that builds the AST) */
-  runtime_options.safe_extensions         = false; /* allow use of SAFExxx datatypes */
-  runtime_options.full_token_loc          = false; /* error messages specify full token location */
-  runtime_options.conversion_functions    = false; /* Create a conversion function for derived datatype */
-  runtime_options.nested_comments         = false; /* Allow the use of nested comments. */
-  runtime_options.ref_standard_extensions = false; /* Allow the use of REFerences (keywords REF_TO, REF, DREF, ^, NULL). */
-  runtime_options.ref_nonstand_extensions = false; /* Allow the use of non-standard extensions to REF_TO datatypes: REF_TO ANY, and REF_TO in struct elements! */
-  runtime_options.nonliteral_in_array_size= false; /* Allow the use of constant non-literals when specifying size of arrays (ARRAY [1..max] OF INT) */
+  runtime_options.disable_implicit_en_eno = false; /* disable: do not generate EN and ENO parameters */
+  runtime_options.pre_parsing             = false; /* disable: allow use of forward references (run pre-parsing phase before the definitive parsing phase that builds the AST) */
+  runtime_options.safe_extensions         = false; /* disable: allow use of SAFExxx datatypes */
+  runtime_options.full_token_loc          = false; /* disable: error messages specify full token location */
+  runtime_options.conversion_functions    = false; /* disable: create a conversion function for derived datatype */
+  runtime_options.nested_comments         = false; /* disable: Allow the use of nested comments. */
+  runtime_options.ref_standard_extensions = false; /* disable: Allow the use of REFerences (keywords REF_TO, REF, DREF, ^, NULL). */
+  runtime_options.ref_nonstand_extensions = false; /* disable: Allow the use of non-standard extensions to REF_TO datatypes: REF_TO ANY, and REF_TO in struct elements! */
+  runtime_options.nonliteral_in_array_size= false; /* disable: Allow the use of constant non-literals when specifying size of arrays (ARRAY [1..max] OF INT) */
   runtime_options.includedir              = NULL;  /* Include directory, where included files will be searched for... */
 
   /* Default values for the command line options... */
@@ -157,7 +160,7 @@
   /******************************************/
   /*   Parse command line options...        */
   /******************************************/
-  while ((optres = getopt(argc, argv, ":nhvfplsrRacI:T:O:")) != -1) {
+  while ((optres = getopt(argc, argv, ":nehvfplsrRacI:T:O:")) != -1) {
     switch(optres) {
     case 'h':
       printusage(argv[0]);
@@ -175,6 +178,7 @@
     case 'a': runtime_options.nonliteral_in_array_size = true;  break;
     case 'c': runtime_options.conversion_functions     = true;  break;
     case 'n': runtime_options.nested_comments          = true;  break;
+    case 'e': runtime_options.disable_implicit_en_eno  = true;  break;
     case 'I':
       /* NOTE: To improve the usability under windows:
        *       We delete last char's path if it ends with "\".
--- a/main.hh	Sat May 07 21:17:49 2016 +0100
+++ b/main.hh	Sun May 08 20:01:15 2016 +0100
@@ -40,6 +40,7 @@
 
 typedef struct {
    /* options specific to stage1_2 */
+	bool disable_implicit_en_eno;  /* Disable the generation of implicit EN and ENO parameters on functions and Function Blocks */
 	bool pre_parsing;              /* Support forward references (Run a pre-parsing phase before the defintive parsing phase that builds the AST) */
 	bool safe_extensions;          /* support SAFE_* datatypes defined in PLCOpen TC5 "Safety Software Technical Specification - Part 1" v1.0 */
 	bool full_token_loc;           /* error messages specify full token location */
--- a/stage1_2/iec_bison.yy	Sat May 07 21:17:49 2016 +0100
+++ b/stage1_2/iec_bison.yy	Sun May 08 20:01:15 2016 +0100
@@ -204,6 +204,9 @@
 /* A global flag used to tell the parser whether to generate conversion function for enumerated data types. */
 extern bool conversion_functions;
 
+/* A global flag used to tell the parser whether to disable generation of implicit EN and ENO parameters. */
+extern bool disable_implicit_en_eno;
+
 /* A global flag used to tell the parser whether to allow use of DREF and '^' operators (defined in IEC 61131-3 v3) */
 extern bool allow_ref_dereferencing;
 
@@ -5001,7 +5004,7 @@
 /* POST_PARSING and STANDARD_PARSING: The rules expected to be applied after the preparser has finished. */
 | function_name_declaration ':' elementary_type_name io_OR_function_var_declarations_list function_body END_FUNCTION
 	{$$ = new function_declaration_c($1, $3, $4, $5, locloc(@$));
-	 add_en_eno_param_decl_c::add_to($$); /* add EN and ENO declarations, if not already there */
+	 if (!disable_implicit_en_eno) add_en_eno_param_decl_c::add_to($$); /* add EN and ENO declarations, if not already there */
 	 variable_name_symtable.pop();
 	 direct_variable_symtable.pop();
 	 library_element_symtable.insert($1, prev_declared_derived_function_name_token);
@@ -5009,7 +5012,7 @@
 /* | FUNCTION derived_function_name ':' derived_type_name io_OR_function_var_declarations_list function_body END_FUNCTION */
 | function_name_declaration ':' derived_type_name io_OR_function_var_declarations_list function_body END_FUNCTION
 	{$$ = new function_declaration_c($1, $3, $4, $5, locloc(@$));
-	 add_en_eno_param_decl_c::add_to($$); /* add EN and ENO declarations, if not already there */
+	 if (!disable_implicit_en_eno) add_en_eno_param_decl_c::add_to($$); /* add EN and ENO declarations, if not already there */
 	 variable_name_symtable.pop();
 	 direct_variable_symtable.pop();
 	 library_element_symtable.insert($1, prev_declared_derived_function_name_token);
@@ -5220,7 +5223,7 @@
 /* POST_PARSING: The rules expected to be applied after the preparser runs. Will only run if pre-parsing command line option is ON. */
 | FUNCTION_BLOCK prev_declared_derived_function_block_name io_OR_other_var_declarations_list function_block_body END_FUNCTION_BLOCK
 	{$$ = new function_block_declaration_c($2, $3, $4, locloc(@$));
-	 add_en_eno_param_decl_c::add_to($$); /* add EN and ENO declarations, if not already there */
+	 if (!disable_implicit_en_eno) add_en_eno_param_decl_c::add_to($$); /* add EN and ENO declarations, if not already there */
 	 /* Clear the variable_name_symtable. Since we have finished parsing the function block,
 	  * the variable names are now out of scope, so are no longer valid!
 	  */
@@ -5231,7 +5234,7 @@
 | FUNCTION_BLOCK derived_function_block_name io_OR_other_var_declarations_list function_block_body END_FUNCTION_BLOCK
 	{$$ = new function_block_declaration_c($2, $3, $4, locloc(@$));
 	 library_element_symtable.insert($2, prev_declared_derived_function_block_name_token);
-	 add_en_eno_param_decl_c::add_to($$); /* add EN and ENO declarations, if not already there */
+	 if (!disable_implicit_en_eno) add_en_eno_param_decl_c::add_to($$); /* add EN and ENO declarations, if not already there */
 	 /* Clear the variable_name_symtable. Since we have finished parsing the function block,
 	  * the variable names are now out of scope, so are no longer valid!
 	  */
@@ -8447,6 +8450,8 @@
 bool full_token_loc;
 /* A global flag used to tell the parser whether to generate conversion function for enumerated data types. */
 bool conversion_functions = false;
+/* A global flag used to tell the parser whether to disable generation of implicit EN and ENO parameters. */
+bool disable_implicit_en_eno;
 /* A global flag used to tell the parser whether to allow use of DREF and '^' operators (defined in IEC 61131-3 v3) */
 bool allow_ref_dereferencing;
 /* A global flag used to tell the parser whether to allow use of REF_TO ANY datatypes (non-standard extension) */
@@ -8710,6 +8715,7 @@
   allow_extensible_function_parameters = true;
   full_token_loc                       = runtime_options.full_token_loc;
   conversion_functions                 = runtime_options.conversion_functions;
+  disable_implicit_en_eno              = runtime_options.disable_implicit_en_eno;
   allow_ref_dereferencing              = runtime_options.ref_standard_extensions;
   allow_ref_to_any                     = runtime_options.ref_nonstand_extensions;
   allow_ref_to_in_derived_datatypes    = runtime_options.ref_nonstand_extensions;
@@ -8747,6 +8753,7 @@
   allow_extensible_function_parameters = false;
   full_token_loc                       = runtime_options.full_token_loc;
   conversion_functions                 = runtime_options.conversion_functions;
+  disable_implicit_en_eno              = runtime_options.disable_implicit_en_eno;
   allow_ref_dereferencing              = runtime_options.ref_standard_extensions;
   allow_ref_to_any                     = runtime_options.ref_nonstand_extensions;
   allow_ref_to_in_derived_datatypes    = runtime_options.ref_nonstand_extensions;
--- a/stage4/generate_c/generate_c.cc	Sat May 07 21:17:49 2016 +0100
+++ b/stage4/generate_c/generate_c.cc	Sun May 08 20:01:15 2016 +0100
@@ -893,19 +893,28 @@
       }
       s4o.print(";\n\n");
       
-      s4o.print(s4o.indent_spaces + "// Control execution\n");
-      s4o.print(s4o.indent_spaces + "if (!EN) {\n");
-      s4o.indent_right();
-      s4o.print(s4o.indent_spaces + "if (__ENO != NULL) {\n");
-      s4o.indent_right();
-      s4o.print(s4o.indent_spaces + "*__ENO = __BOOL_LITERAL(FALSE);\n");
-      s4o.indent_left();
-      s4o.print(s4o.indent_spaces + "}\n");
-      s4o.print(s4o.indent_spaces + "return ");
-      symbol->derived_function_name->accept(print_base);
-      s4o.print(";\n");
-      s4o.indent_left();
-      s4o.print(s4o.indent_spaces + "}\n");
+      
+      // Only generate the code that controls the execution of the function's body if the
+      // function contains a declaration of both the EN and ENO variables
+      search_var_instance_decl_c search_var(symbol);
+      identifier_c  en_var("EN");
+      identifier_c eno_var("ENO");
+      if (   (search_var.get_vartype(& en_var) == search_var_instance_decl_c::input_vt)
+          && (search_var.get_vartype(&eno_var) == search_var_instance_decl_c::output_vt)) {
+        s4o.print(s4o.indent_spaces + "// Control execution\n");
+        s4o.print(s4o.indent_spaces + "if (!EN) {\n");
+        s4o.indent_right();
+        s4o.print(s4o.indent_spaces + "if (__ENO != NULL) {\n");
+        s4o.indent_right();
+        s4o.print(s4o.indent_spaces + "*__ENO = __BOOL_LITERAL(FALSE);\n");
+        s4o.indent_left();
+        s4o.print(s4o.indent_spaces + "}\n");
+        s4o.print(s4o.indent_spaces + "return ");
+        symbol->derived_function_name->accept(print_base);
+        s4o.print(";\n");
+        s4o.indent_left();
+        s4o.print(s4o.indent_spaces + "}\n");
+      }
     
       /* (C) Function body */
       generate_c_SFC_IL_ST_c generate_c_code(&s4o, symbol->derived_function_name, symbol);
@@ -1071,31 +1080,40 @@
       } else {
         s4o.print(" {\n");
         s4o.indent_right();
-      
-        s4o.print(s4o.indent_spaces + "// Control execution\n");
-        s4o.print(s4o.indent_spaces + "if (!");
-        s4o.print(GET_VAR);
-        s4o.print("(");
-        s4o.print(FB_FUNCTION_PARAM);
-        s4o.print("->EN)) {\n");
-        s4o.indent_right();
-        s4o.print(s4o.indent_spaces);
-        s4o.print(SET_VAR);
-        s4o.print("(");
-        s4o.print(FB_FUNCTION_PARAM);
-        s4o.print("->,ENO,,__BOOL_LITERAL(FALSE));\n");
-        s4o.print(s4o.indent_spaces + "return;\n");
-        s4o.indent_left();
-        s4o.print(s4o.indent_spaces + "}\n");
-        s4o.print(s4o.indent_spaces + "else {\n");
-        s4o.indent_right();
-        s4o.print(s4o.indent_spaces);
-        s4o.print(SET_VAR);
-        s4o.print("(");
-        s4o.print(FB_FUNCTION_PARAM);
-        s4o.print("->,ENO,,__BOOL_LITERAL(TRUE));\n");
-        s4o.indent_left();
-        s4o.print(s4o.indent_spaces + "}\n");
+
+        // Only generate the code that controls the execution of the function's body if the
+        // function contains a declaration of both the EN and ENO variables
+        search_var_instance_decl_c search_var(symbol);
+        identifier_c  en_var("EN");
+        identifier_c eno_var("ENO");
+        if (   (search_var.get_vartype(& en_var) == search_var_instance_decl_c::input_vt)
+            && (search_var.get_vartype(&eno_var) == search_var_instance_decl_c::output_vt)) {
+
+          s4o.print(s4o.indent_spaces + "// Control execution\n");
+          s4o.print(s4o.indent_spaces + "if (!");
+          s4o.print(GET_VAR);
+          s4o.print("(");
+          s4o.print(FB_FUNCTION_PARAM);
+          s4o.print("->EN)) {\n");
+          s4o.indent_right();
+          s4o.print(s4o.indent_spaces);
+          s4o.print(SET_VAR);
+          s4o.print("(");
+          s4o.print(FB_FUNCTION_PARAM);
+          s4o.print("->,ENO,,__BOOL_LITERAL(FALSE));\n");
+          s4o.print(s4o.indent_spaces + "return;\n");
+          s4o.indent_left();
+          s4o.print(s4o.indent_spaces + "}\n");
+          s4o.print(s4o.indent_spaces + "else {\n");
+          s4o.indent_right();
+          s4o.print(s4o.indent_spaces);
+          s4o.print(SET_VAR);
+          s4o.print("(");
+          s4o.print(FB_FUNCTION_PARAM);
+          s4o.print("->,ENO,,__BOOL_LITERAL(TRUE));\n");
+          s4o.indent_left();
+          s4o.print(s4o.indent_spaces + "}\n");
+        }
       
         /* (C.4) Initialize TEMP variables */
         /* function body */
@@ -1380,6 +1398,15 @@
   s4o.print("/*     FILE GENERATED BY iec2c             */\n");
   s4o.print("/* Editing this file is not recommended... */\n");
   s4o.print("/*******************************************/\n\n");
+  
+  if (runtime_options.disable_implicit_en_eno) {
+    // If we are not generating the EN and ENO parameters for functions and FB,
+    //   then make sure we use the standard library version compiled without these parameters too!
+    s4o.print("#ifndef DISABLE_EN_ENO_PARAMETERS\n");
+    s4o.print("#define DISABLE_EN_ENO_PARAMETERS\n");
+    s4o.print("#endif\n");
+  }
+  
   s4o.print("#include \"iec_std_lib.h\"\n\n");
   s4o.print("#include \"accessor.h\"\n\n"); 
   s4o.print("#include \"POUS.h\"\n\n");
@@ -1685,6 +1712,15 @@
       s4o.print("/*     FILE GENERATED BY iec2c             */\n");
       s4o.print("/* Editing this file is not recommended... */\n");
       s4o.print("/*******************************************/\n\n");
+  
+      if (runtime_options.disable_implicit_en_eno) {
+        // If we are not generating the EN and ENO parameters for functions and FB,
+        //   then make sure we use the standard library version compiled without these parameters too!
+        s4o.print("#ifndef DISABLE_EN_ENO_PARAMETERS\n");
+        s4o.print("#define DISABLE_EN_ENO_PARAMETERS\n");
+        s4o.print("#endif\n");
+      }
+      
       s4o.print("#include \"iec_std_lib.h\"\n\n");
       
       /* (A) resource declaration... */
@@ -2118,7 +2154,17 @@
 /* B 0 - Programming Model */
 /***************************/
     void *visit(library_c *symbol) {
-      pous_incl_s4o.print("#ifndef __POUS_H\n#define __POUS_H\n\n#include \"accessor.h\"\n#include \"iec_std_lib.h\"\n\n");
+      pous_incl_s4o.print("#ifndef __POUS_H\n#define __POUS_H\n\n");
+      
+      if (runtime_options.disable_implicit_en_eno) {
+        // If we are not generating the EN and ENO parameters for functions and FB,
+        //   then make sure we use the standard library version compiled without these parameters too!
+        pous_incl_s4o.print("#ifndef DISABLE_EN_ENO_PARAMETERS\n");
+        pous_incl_s4o.print("#define DISABLE_EN_ENO_PARAMETERS\n");
+        pous_incl_s4o.print("#endif\n");
+      }
+      
+      pous_incl_s4o.print("#include \"accessor.h\"\n#include \"iec_std_lib.h\"\n\n");
 
       for(int i = 0; i < symbol->n; i++) {
         symbol->elements[i]->accept(*this);
--- a/stage4/generate_c/generate_c_base.cc	Sat May 07 21:17:49 2016 +0100
+++ b/stage4/generate_c/generate_c_base.cc	Sun May 08 20:01:15 2016 +0100
@@ -249,13 +249,48 @@
       return NULL;
     }
 
+    /* Call a standard library function that does a comparison (GT, NE, EQ, LT, ...)
+     * NOTE: Typically, the function will have the following parameters: 
+     *         1st parameter: EN  (enable)
+     *         2nd parameter: ENO (enable output)
+     *         3rd parameter: number of operands we will be passing (required because we are calling an extensible standard function!)
+     *         4th parameter: the left  hand side of the comparison expression (in out case, the IL implicit variable)
+     *         4th parameter: the right hand side of the comparison expression (in out case, current operand)
+     *       
+     *         The 1st and 2nd parameter may not be present, only issue them if NE and ENO are being generated!
+     *         The 3rd parameter must not be generated when the 'NE' function is called (it is not an extensible function!)
+     * 
+     *  NOTE: To implement this correctly, this function should really instantiate a 
+     *   function_invocation_c and have the generate_c visitor generate the code automatically for this
+     *   function invocation. However, the code for function invocations is currently duplicated 
+     *   for IL and ST. Until this code is not re-formulated into a single piece of general code, for now
+     *   we generate the function call directly here in print_compare_function()
+     */ 
     void *print_compare_function(const char *function,
           symbol_c *compare_type,
           symbol_c *l_exp,
           symbol_c *r_exp) {
-      s4o.print(function);
-      compare_type->accept(*this);
-      s4o.print("(__BOOL_LITERAL(TRUE), NULL, 2, ");
+      // Print out the name of the function we will call.
+      // It will be something like LE_TIME, LE_DATE, GT_DATE, ...
+      //    (in other words, we are calling an overloaded function!)
+      s4o.print(function); // the GT, LE, ... part
+      s4o.print("_");  // the '_' part...
+      compare_type->accept(*this); // the TIME, DATE, ... part.
+      s4o.print("(");  // start of parameters to function call...
+      // Determine whether this function has the EN parameter
+      //    (we just check the base LE, GT, .. function, as it should have
+      //     the same parameters as the overloaded function!)
+      function_symtable_t::iterator lower = function_symtable.lower_bound(function);
+      if (lower == function_symtable.end()) ERROR;  // We want to call a function that does not exist!!?? Hmm...
+      search_var_instance_decl_c search_var(function_symtable.get_value(lower));
+      identifier_c  en_var("EN");
+      identifier_c eno_var("ENO");
+      if (search_var.get_vartype(& en_var) == search_var_instance_decl_c::input_vt)
+        s4o.print("__BOOL_LITERAL(TRUE), "); // function has EN parameter, pass TRUE
+      if (search_var.get_vartype(&eno_var) == search_var_instance_decl_c::output_vt)
+        s4o.print("NULL, "); // function has ENO parameter, pass NULL
+      if (strcmp(function, "NE") != 0) // All comparison library functions are extensible, except for 'NE'!!
+        s4o.print("2, "); // function is extensible, so must first pass the number of parameters that follow
       l_exp->accept(*this);
       s4o.print(", ");
       r_exp->accept(*this);
--- a/stage4/generate_c/generate_c_il.cc	Sat May 07 21:17:49 2016 +0100
+++ b/stage4/generate_c/generate_c_il.cc	Sun May 08 20:01:15 2016 +0100
@@ -327,21 +327,8 @@
 
       this->implicit_variable_result.accept(*this);
       s4o.print(" = ");
-      s4o.print(operation);
-      operand->datatype->accept(*this);
-      /* NOTE: we are calling a standard Function: 
-       *         1st parameter: EN  (enable)
-       *         2nd parameter: ENO (enable output)
-       *         3rd parameter: number of operands we will be passing (required because we are calling an extensible standard function!)
-       *         4th parameter: the left  hand side of the comparison expression (in out case, the IL implicit variable)
-       *         4th parameter: the right hand side of the comparison expression (in out case, current operand)
-       */
-      s4o.print("(__BOOL_LITERAL(TRUE), NULL, 2, ");
-      this->implicit_variable_current.accept(*this);
-      s4o.print(", ");
-      operand->accept(*this);
-      s4o.print(")");
-
+      // print_compare_function is in generate_c_base_c, which is inherited by generate_c_il_c
+      print_compare_function(operation, operand->datatype, &(this->implicit_variable_current), operand);
       return NULL;
     }
 
@@ -937,6 +924,7 @@
   }
   s4o.print("(");
   s4o.indent_right();
+  s4o.print("\n"+s4o.indent_spaces);
   
   int nb_param = 0;
   PARAM_LIST_ITERATOR() {
@@ -991,6 +979,7 @@
   }
   
   s4o.print(")");
+  s4o.indent_left();  
 
   CLEAR_PARAM_LIST()
 
@@ -1711,12 +1700,12 @@
 
 void *visit(MOD_operator_c *symbol)	{XXX_operator(&(this->implicit_variable_result), " %= ", this->current_operand); return NULL;}
 
-void *visit(GT_operator_c *symbol)	{CMP_operator(this->current_operand, "GT_"); return NULL;}
-void *visit(GE_operator_c *symbol)	{CMP_operator(this->current_operand, "GE_"); return NULL;}
-void *visit(EQ_operator_c *symbol)	{CMP_operator(this->current_operand, "EQ_"); return NULL;}
-void *visit(LT_operator_c *symbol)	{CMP_operator(this->current_operand, "LT_"); return NULL;}
-void *visit(LE_operator_c *symbol)	{CMP_operator(this->current_operand, "LE_"); return NULL;}
-void *visit(NE_operator_c *symbol)	{CMP_operator(this->current_operand, "NE_"); return NULL;}
+void *visit(GT_operator_c *symbol)	{CMP_operator(this->current_operand, "GT"); return NULL;}
+void *visit(GE_operator_c *symbol)	{CMP_operator(this->current_operand, "GE"); return NULL;}
+void *visit(EQ_operator_c *symbol)	{CMP_operator(this->current_operand, "EQ"); return NULL;}
+void *visit(LT_operator_c *symbol)	{CMP_operator(this->current_operand, "LT"); return NULL;}
+void *visit(LE_operator_c *symbol)	{CMP_operator(this->current_operand, "LE"); return NULL;}
+void *visit(NE_operator_c *symbol)	{CMP_operator(this->current_operand, "NE"); return NULL;}
 
 
 //SYM_REF0(CAL_operator_c)
--- a/stage4/generate_c/generate_c_sfc.cc	Sat May 07 21:17:49 2016 +0100
+++ b/stage4/generate_c/generate_c_sfc.cc	Sun May 08 20:01:15 2016 +0100
@@ -720,8 +720,6 @@
       /* generate elapsed_time initializations */
       s4o.print(s4o.indent_spaces + "// Calculate elapsed_time\n");
       s4o.print(s4o.indent_spaces +"current_time = __CURRENT_TIME;\n");
-//       s4o.print(s4o.indent_spaces +"elapsed_time = __time_sub(__BOOL_LITERAL(TRUE), NULL, current_time, ");
-//       s4o.print(s4o.indent_spaces +"elapsed_time = SUB_TIME(__BOOL_LITERAL(TRUE), NULL, current_time, ");
       s4o.print(s4o.indent_spaces +"elapsed_time = __time_sub(current_time, ");
       print_variable_prefix();
       s4o.print("__lasttick_time);\n");
@@ -768,8 +766,6 @@
       s4o.indent_right();
       s4o.print(s4o.indent_spaces);
       print_variable_prefix();
-//      s4o.print("__step_list[i].elapsed_time = __time_add(__BOOL_LITERAL(TRUE), NULL, ");
-//      s4o.print("__step_list[i].elapsed_time = ADD_TIME(__BOOL_LITERAL(TRUE), NULL, ");
       s4o.print("__step_list[i].T.value = __time_add(");
       print_variable_prefix();
       s4o.print("__step_list[i].T.value, elapsed_time);\n");
@@ -802,8 +798,6 @@
       s4o.indent_right();
       s4o.print(s4o.indent_spaces);
       print_variable_prefix();
-//       s4o.print("__action_list[i].set_remaining_time = __time_sub(__BOOL_LITERAL(TRUE), NULL, ");
-//       s4o.print("__action_list[i].set_remaining_time = SUB_TIME(__BOOL_LITERAL(TRUE), NULL, ");
       s4o.print("__action_list[i].set_remaining_time = __time_sub(");
       print_variable_prefix();
       s4o.print("__action_list[i].set_remaining_time, elapsed_time);\n");
@@ -829,8 +823,6 @@
       s4o.indent_right();
       s4o.print(s4o.indent_spaces);
       print_variable_prefix();
-//       s4o.print("__action_list[i].reset_remaining_time = __time_sub(__BOOL_LITERAL(TRUE), NULL, ");
-//       s4o.print("__action_list[i].reset_remaining_time = SUB_TIME(__BOOL_LITERAL(TRUE), NULL, ");
       s4o.print("__action_list[i].reset_remaining_time = __time_sub(");
       print_variable_prefix();
       s4o.print("__action_list[i].reset_remaining_time, elapsed_time);\n");
--- a/stage4/generate_c/generate_c_st.cc	Sat May 07 21:17:49 2016 +0100
+++ b/stage4/generate_c/generate_c_st.cc	Sun May 08 20:01:15 2016 +0100
@@ -623,7 +623,7 @@
   if (get_datatype_info_c::is_TIME_compatible      (symbol->l_exp->datatype) ||
       get_datatype_info_c::is_ANY_DATE_compatible  (symbol->l_exp->datatype) ||
       get_datatype_info_c::is_ANY_STRING_compatible(symbol->l_exp->datatype))
-    return print_compare_function("EQ_", symbol->l_exp->datatype, symbol->l_exp, symbol->r_exp);
+    return print_compare_function("EQ", symbol->l_exp->datatype, symbol->l_exp, symbol->r_exp);
   return print_binary_expression(symbol->l_exp, symbol->r_exp, " == ");
 }
 
@@ -631,7 +631,7 @@
   if (get_datatype_info_c::is_TIME_compatible      (symbol->l_exp->datatype) ||
       get_datatype_info_c::is_ANY_DATE_compatible  (symbol->l_exp->datatype) ||
       get_datatype_info_c::is_ANY_STRING_compatible(symbol->l_exp->datatype))
-    return print_compare_function("NE_", symbol->l_exp->datatype, symbol->l_exp, symbol->r_exp);
+    return print_compare_function("NE", symbol->l_exp->datatype, symbol->l_exp, symbol->r_exp);
   return print_binary_expression(symbol->l_exp, symbol->r_exp, " != ");
 }
 
@@ -639,7 +639,7 @@
   if (get_datatype_info_c::is_TIME_compatible      (symbol->l_exp->datatype) ||
       get_datatype_info_c::is_ANY_DATE_compatible  (symbol->l_exp->datatype) ||
       get_datatype_info_c::is_ANY_STRING_compatible(symbol->l_exp->datatype))
-    return print_compare_function("LT_", symbol->l_exp->datatype, symbol->l_exp, symbol->r_exp);
+    return print_compare_function("LT", symbol->l_exp->datatype, symbol->l_exp, symbol->r_exp);
   return print_binary_expression(symbol->l_exp, symbol->r_exp, " < ");
 }
 
@@ -647,7 +647,7 @@
   if (get_datatype_info_c::is_TIME_compatible      (symbol->l_exp->datatype) ||
       get_datatype_info_c::is_ANY_DATE_compatible  (symbol->l_exp->datatype) ||
       get_datatype_info_c::is_ANY_STRING_compatible(symbol->l_exp->datatype))
-    return print_compare_function("GT_", symbol->l_exp->datatype, symbol->l_exp, symbol->r_exp);
+    return print_compare_function("GT", symbol->l_exp->datatype, symbol->l_exp, symbol->r_exp);
   return print_binary_expression(symbol->l_exp, symbol->r_exp, " > ");
 }
 
@@ -655,7 +655,7 @@
   if (get_datatype_info_c::is_TIME_compatible      (symbol->l_exp->datatype) ||
       get_datatype_info_c::is_ANY_DATE_compatible  (symbol->l_exp->datatype) ||
       get_datatype_info_c::is_ANY_STRING_compatible(symbol->l_exp->datatype))
-    return print_compare_function("LE_", symbol->l_exp->datatype, symbol->l_exp, symbol->r_exp);
+    return print_compare_function("LE", symbol->l_exp->datatype, symbol->l_exp, symbol->r_exp);
   return print_binary_expression(symbol->l_exp, symbol->r_exp, " <= ");
 }
 
@@ -663,19 +663,11 @@
   if (get_datatype_info_c::is_TIME_compatible      (symbol->l_exp->datatype) ||
       get_datatype_info_c::is_ANY_DATE_compatible  (symbol->l_exp->datatype) ||
       get_datatype_info_c::is_ANY_STRING_compatible(symbol->l_exp->datatype))
-    return print_compare_function("GE_", symbol->l_exp->datatype, symbol->l_exp, symbol->r_exp);
+    return print_compare_function("GE", symbol->l_exp->datatype, symbol->l_exp, symbol->r_exp);
   return print_binary_expression(symbol->l_exp, symbol->r_exp, " >= ");
 }
 
 void *visit(add_expression_c *symbol) {
-/*
-  symbol_c *left_type  = symbol->l_exp->datatype;
-  symbol_c *right_type = symbol->r_exp->datatype;
-  if ((typeid(*left_type) == typeid(time_type_name_c) && typeid(*right_type) == typeid(time_type_name_c)) ||
-      (typeid(*left_type) == typeid(tod_type_name_c)  && typeid(*right_type) == typeid(time_type_name_c)) ||
-      (typeid(*left_type) == typeid(dt_type_name_c)   && typeid(*right_type) == typeid(time_type_name_c)))
-    return print_binary_function("__time_add", symbol->l_exp, symbol->r_exp);
-*/
   if (get_datatype_info_c::is_TIME_compatible      (symbol->datatype) ||
       get_datatype_info_c::is_ANY_DATE_compatible  (symbol->datatype))
     return print_binary_function("__time_add", symbol->l_exp, symbol->r_exp);
@@ -683,17 +675,6 @@
 }
 
 void *visit(sub_expression_c *symbol) {
-/*
-  symbol_c *left_type  = symbol->l_exp->datatype;
-  symbol_c *right_type = symbol->r_exp->datatype;
-  if ((typeid(*left_type) == typeid(time_type_name_c) && typeid(*right_type) == typeid(time_type_name_c)) ||
-      (typeid(*left_type) == typeid(date_type_name_c) && typeid(*right_type) == typeid(date_type_name_c)) ||
-      (typeid(*left_type) == typeid(tod_type_name_c)  && typeid(*right_type) == typeid(time_type_name_c)) ||
-      (typeid(*left_type) == typeid(tod_type_name_c)  && typeid(*right_type) == typeid(tod_type_name_c))  ||
-      (typeid(*left_type) == typeid(dt_type_name_c)   && typeid(*right_type) == typeid(time_type_name_c)) ||
-      (typeid(*left_type) == typeid(dt_type_name_c)   && typeid(*right_type) == typeid(dt_type_name_c)))
-    return print_binary_function("__time_sub", symbol->l_exp, symbol->r_exp);
-*/  
   if (get_datatype_info_c::is_TIME_compatible      (symbol->datatype) ||
       get_datatype_info_c::is_ANY_DATE_compatible  (symbol->datatype))
     return print_binary_function("__time_sub", symbol->l_exp, symbol->r_exp);
@@ -701,26 +682,12 @@
 }
 
 void *visit(mul_expression_c *symbol) {
-/*
-  symbol_c *left_type  = symbol->l_exp->datatype;
-  symbol_c *right_type = symbol->r_exp->datatype;
-  if ((typeid(*left_type) == typeid(time_type_name_c) && get_datatype_info_c::is_ANY_INT_compatible (right_type)) ||
-      (typeid(*left_type) == typeid(time_type_name_c) && get_datatype_info_c::is_ANY_REAL_compatible(right_type)))
-    return print_binary_function("__time_mul", symbol->l_exp, symbol->r_exp);
-*/  
   if (get_datatype_info_c::is_TIME_compatible      (symbol->datatype))
     return print_binary_function("__time_mul", symbol->l_exp, symbol->r_exp);
   return print_binary_expression(symbol->l_exp, symbol->r_exp, " * ");
 }
 
 void *visit(div_expression_c *symbol) {
-/*
-  symbol_c *left_type  = symbol->l_exp->datatype;
-  symbol_c *right_type = symbol->r_exp->datatype;
-  if ((typeid(*left_type) == typeid(time_type_name_c) && get_datatype_info_c::is_ANY_INT_compatible (right_type)) ||
-      (typeid(*left_type) == typeid(time_type_name_c) && get_datatype_info_c::is_ANY_REAL_compatible(right_type)))
-    return print_binary_function("__time_div", symbol->l_exp, symbol->r_exp);
-*/
   if (get_datatype_info_c::is_TIME_compatible      (symbol->datatype))
     return print_binary_function("__time_div", symbol->l_exp, symbol->r_exp);
   return print_binary_expression(symbol->l_exp, symbol->r_exp, " / ");
@@ -736,13 +703,9 @@
 }
 
 void *visit(power_expression_c *symbol) {
-  s4o.print("EXPT__LREAL__LREAL__LREAL((BOOL)__BOOL_LITERAL(TRUE),\n");
-  s4o.indent_right();
-  s4o.print(s4o.indent_spaces + "NULL,\n");
-  s4o.print(s4o.indent_spaces + "(LREAL)(");
+  s4o.print("__expt((LREAL)(");
   symbol->l_exp->accept(*this);
-  s4o.print("),\n");
-  s4o.print(s4o.indent_spaces + "(LREAL)(");
+  s4o.print("), (LREAL)(");
   symbol->r_exp->accept(*this);
   s4o.print("))");
   return NULL;
@@ -895,6 +858,7 @@
   }
   s4o.print("(");
   s4o.indent_right();
+  s4o.print("\n"+s4o.indent_spaces);
   
   int nb_param = 0;
   PARAM_LIST_ITERATOR() {