>>>>>State1 State2 Result >>>>> T T T >>>>> T F F >>>>> F T T >>>>> F F T >>>>>>>>>>The first state indicated if something if being used and the second if access is granted. I really want to do this check when creating nodes for a treeview so speed is quite important.
>>>State1 = "TTFF" >>>State2 = "TFTF" >>>>>
Result="" >>for ix=1 to len(State1) >> Result = Result + iif(substr(State2,ix)='T' or substr(State2,ix)=substr(State1,ix),'T','F') >>endfor >>>>However you're saying speed is important. For a similar thing where strings are much much longer I use a FLL.
Result=State2 for ix=1 to len(Result) if substr(m.Result,ix)='F' and substr(m.State1,ix)='F' Result = stuff(m.Result,m.ix,1,'T') endif endfor ? ResultCetin