How do I create a separate function in a DLL file?
A function that has inputs and outputs?
Hi, Aloysius.
I’m not sure that I understand “separate function… that has inputs and outputs.” Could you clarify?
–robert
I meant a subroutine of some sort in the code sir.
@aloysius, I’m still uncertain what you are asking. Are you asking how to write functions in C++?
Maybe you could take a look at the examples in my GitHub QSpice repository.
–robert
I think your question is related to code modularization in C (aka function).
Cblock used Qspice is an entirely standard C, so just modularize your code as how you normally do when using C for other purpose.
Hi, Arief.
Just to be clear, the DMC compiler used by QSpice is actually a C/C++ compiler. Since the DLL code is named *.cpp, it will compile as C++.
C++ is not a proper superset of C so there are subtle differences. For most folk that write in C, the differences likely won’t matter – until they do matter… ![]()
More details can be found here.
–robert