Hello, I'm new to this forum.
Right now I'm developing a software based on Genetic Algorithms. I really have almost none experience, and I have a question.
First of, this software is a prototype, a template. So the user can choose between a lot of choices (types of crossing and mutations). And I have many radio buttons for that.
The question, like in the thread title is, can I give the name of a suroutine to a variable, so that sub executes instead of making a comparisson about which radio button is selecten, THEN execute the sub of that option. This is sort of the problem:
for i=0 to 1000 ' A long for statement
if radiobutton1.checked = true then
method1(var1, var2)
elseif radiobutton2.checked = true then
method2(var1, var2)
...
else
methodn(var1, var2)
endif
some other code..
next
And I want something like:
if radiobutton1.checked = true then
method = method1(var1, var2)
elseif radiobutton2.checked = true then
method = method2(var1, var2)
...
else
method = methodn(var1, var2)
endif
for i = 0 to 1000
method(var1, var2)
some other code...
next
I'm studying Software Engineering but I'm just starting really.
And sorry for my bad english (not my language).