then you could just take it and do the following: GetKey 0->C Lbl A 0->A Lbl B Getky()->A If A=0:Goto B For(B,1,LDim(L1)) If A=L1(B):B->C End If C=0:Goto A C