I have taken up a New Assignment of Automation using Rational Robo. I was trying to figure out if I can Substitute a command using variables.
I have scenarios where the data comes from the excel sheet. My present code looks like this.
for condition=1 to 10
If Condition = 1 then
elseif Condition =2 then
Can I be able to do something this sort
for i=1 to 10
Substitute this variable "a" as a command
Thanks in Advance [img]images/icons/smile.gif[/img]
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">select case condition
a = function ( 0 )
a = function ( 1 )
a = function ( n )
end select</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">And have another switch statement inside the function itself... although I don't see how this would be an improvement. Also, think of the poor guy that tries to figure out what your script is doing if the code decides what function to call on its own... you'd have to evaluate all the conditional statements yourself just to figure out what was going on.