Data exchange between a plugin and a script happens via a
stack. Reading and writing arguments from/to the stack gives you a maximum of flexibility, and you wil be able to exchange also complex data structures. But it can also be tedious and error prone. Use instead the helper classes located in
programming/common/stack and
programming/include/stack: they will greatly simplify the task. Have a look at the example plugins
simExtSkeletonPlugin and
simExtSkeletonPluginNG.