Ok this question may be shocking for javascript haters and hard-core developers, forgive me!
I love the way I can write a callback function in javascript
var on = function(isTrue, doThis) {if (isTrue) doThis();}
Is there any possibility to replicate the same idea in C ? I know it's type dependent. More and less this is my case:
I have multiple booleans and multiple filters so my use would be, instead of writing
if (thisIs == true) executeThisVoid(passingThisStruct)
I would love to write:
on(thisIs, function(struct){ do this and this})
or simply
on(thisIs, executeThisVoid);
Many thanks everybody.