Hi Fletch,

for Your example:

if Test1 == true
begin
  Action2
  Action3
end
Action4
Action5

The actions 4 & 5 are executed always, no matter if the result of Test1 
is true or false...

To avoid repeated code: What´s about modularisation? Like 
methods/functions? Have a look at 
http://en.wikipedia.org/wiki/Modularity_(programming) or ask google.

Regards,
Christian


Fletch schrieb:
> That is kind of what I mean, however in my case this would lead to a lot of 
> repeated code.
>
> Test1
> (if True)
> Action2
> Action3
> Action4
> Action5
> (else)
> Action4
> Action5
>
> I have been thinking about a goto(Action4) which works, but as my code is 
> sequential, it follows Action4 with Action2, Action3, and Action4 again
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.openqa.org/thread.jspa?threadID=5563&messageID=15502#15502
> _______________________________________________
> Wtr-general mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>   

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to