So; I have an urge to delete some text from lines of a list field, like this:

put 1 into QOUNT
   repeat until line QOUNT of fld "PROCD" is empty
      delete word 2 of line QOUNT of fld "PROCD"
      add 1 to QOUNT
   end repeat

which is all fine and dandy.

The ONLY problem is that the word ('Plovdiv') that I want to remove from
the lines of the list field is NOT always the second word . . .

Ever a trier, I tried this:

put 1 into QOUNT
   repeat until line QOUNT of fld "PROCD" is empty
      delete "Plovdiv" from line QOUNT of fld "PROCD"
      add 1 to QOUNT
   end repeat

No joy . . .

Now, I suppose I could have a routine that trots down the line checking if each word is 'Plovdiv',
and if so, deleting it.

Seems a bit wasteful and slow . . .

-------------------------------------

I t would be rather jolly if

delete "Specific word" from line X of fld "Y"

could be implemented.

Richmond.

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to