Forum Discussion

googleid_109376's avatar
googleid_109376
Occasional Contributor
12 years ago

Conditional USEUNIT

Hello,



I would like to know if it is possible to have some conditional USEUNIT, that is, linked units depending on some runtime condition. For example, I tried this:



if(condition1)

//USEUNIT unit1

else

//USEUNIT unit2



but it did not work because it linked both units, like if the conditions were not there.



How can I link units depending on some condition? 



Thanks
  • It is impossible, but you can try using Runner.CallMethod for your task (if you have, for instance, two functions with the same name in different units).
  • karkadil's avatar
    karkadil
    Valued Contributor
    It is impossible, but you can try using Runner.CallMethod for your task (if you have, for instance, two functions with the same name in different units).