cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

sunsetquest
Adept II

Is it possible to have dynamic code in brook+?

I have about 50 different tasks that i would like to choose from at run time.  I know i could use a large switch statement for this but I think that would be slow.  Is there any dynamic functions i could call or self modifying code that can be done?

For example... if I have the value 43 I would like to call fuction 43.

For my application this would really help out.  Is there anything else i should be looking at instead?

 

0 Likes
1 Reply
nberger
Adept I

If you look at the C code generated by brook, you see that the kernel calls are ordinary function calls, so you could use function pointers.
0 Likes