Offset with 'charstoskip' doesn't work? [was RunRev vs RealBasic (Richard Gaskin)]

Michael D Mays michael.rr at mdmays.com
Fri Jan 21 10:52:06 EST 2005


I thought I would see if I could solve the RB/Rev/SC challenge and 
tried this as a first attempt:

on mouseUp
   put fld 1 into sFld
   put fld 2 into tFld
   put "" into fld 3
   -- put 0 into it --*1
   put zero into t --*2
   repeat with i= 1 to the number of lines in tFld
     repeat
       -- get offset(line i of tFld,sfld,it) --*1
       get offset(line i of tFld,sfld,t) --*2
       put it into t --*2
       if it is zero then exit repeat
       put line i of tFld&&i&&it&return after fld 3
     end repeat
   end repeat
end mouseUp

but what happens is along the way it finds a search string in question 
at char 246674 and then finds it again at 250675 and then finds it 
again at 246674 then at 250675 then at 246674 then at 250675 ...

Is offset not working or am I not?

Michael


More information about the Use-livecode mailing list