How to use netlist-passed parameter in C++ code

@Jope , thanks for the solution, it works!

However, the parameter should be always in between inputs and outputs within the data[] array. This seems to be the way the spice “variables” are passed to the dll.

So, in case of automatic code generation this is a no-brainer: parameters defined in the symbol will be added to the code and at the right place in the data[] array.

But if one has the epiphany to add parameters after writing the whole code, it is a little inconvenient since re-generating the c++ template will overwrite all the work done. One has to shift the position of the outputs and place the parameters in between inputs and outputs.

   bool  A   = data[0].b; // input
   bool  B   = data[1].b; // input
   bool &out = data[3].b; // output
   double TDELAY = data[2].d; // input parameter

Maybe @Engelhardt could change the data[] array generation so that the parameters could be added at the end of it? Not sure, if that’s possible.