I’m designing a function that takes as argument one structure and any number of flags. The function will contain a couple of ifs checking whether a specific flag is set.
What is the neatest way to achieve this? I was thinking about passing the flags as separate string arguments. Is there a neater solution?
I would do it like using
vararginandismember:And you can call the function like that:
This will activate
flag1andflag3.