Page 1 of 1

Vertical Bar

Posted: Fri Apr 18, 2025 6:53 pm
by richmond62
I have a text file that contains "cheese|cheese" among its contents.

And I wonder why THIS throws a 'bluey':

Code: Select all

put 1 into VOXX
   repeat until VOXX > 500
      if word VOXX of fld "GUFF" contains "|" then
         put word VOXX of fld "GUFF"
      end if
      add 1 to VOXX
   end repeat

Re: Vertical Bar

Posted: Fri Apr 18, 2025 7:30 pm
by richmond62
OK, that's working now. 8)

BUT this isn't:

Code: Select all

put 1 into VOXX
   repeat until VOXX > 500
      if word VOXX of fld "GUFF" contains "|" then
         put word VOXX of fld "GUFF" into ZOOP
         set the itemDelimiter to "|"
         put item 2 of ZOOP into ZAAP
         replace word VOXX of fld "GUFF" with ZAAP
      end if
      add 1 to VOXX
   end repeat

Re: Vertical Bar

Posted: Sat Apr 19, 2025 8:09 pm
by dunbarx
Richmond.

Syntax error for "replace". Should be:

Code: Select all

replace word VOXX of fld "GUFF" with ZAAP in fld "GUFF"
Craig