so going back more (just drank some coffee)...

this?
code:
 if (ascan($1,$n)>-1 and $m) or ascan($1,$n)+$m<0 $=$+chr(1)+$n endif

I even left the AND and OR keywords there...

going for smoke, trying later.
_________________________
!

download KiXnet