Skip to main content
GameDev.net gamedev.net
🔒 Locked

Strings to Function Calls

Started by Zipster Apr 23, 2001 at 2:31 AM 1 replies 300+ views
Original Post
Zipster
Zipster
Basically I have a string, lets say "DoFunction". How do I take that string and then tell the program to execute the function with that same name? I don''t want to use a look-up table or a bunch of if statements or anything else right now, I just want to see how to do it, if it''s even possible. I''m writing my own scripting engine and I want it to be as flexible as possible, meaning hard-coing as little as possible. I don''t know if it can be done since I''ve never tried before.
Zipster
Zipster
THanks for the link, I''m looking into it now, but I was hoping I wouldn''t have to use someone elses code and that there would be some other way to do it.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.