Call Functions Until One Meets Condition





5.00/5 (1 vote)
Sorry, but I don't like adding additional artificial elements like function arrays . I would code it as following:If isok(Step1()) OrElse isok(Step2(1,1)) OrElse isok(Step3() OrElse isok(Step4() OrElse isok(0+1) thenend ifFunction isok(ByVal rc as Integer) As Boolean ...
Sorry, but I don't like adding additional artificial elements like function arrays . I would code it as following:
If isok(Step1()) OrElse isok(Step2(1,1)) OrElse isok(Step3() OrElse isok(Step4() OrElse isok(0+1) then end if Function isok(ByVal rc as Integer) As Boolean if(rc>=5) Return True return False End FunctionI think it's less coding and easier to understand.