You have no doubt heard this before, but it sounds like you need to re-engineer this using SQL.
Bob Sneidar IT Manager Calvary Chapel CM Sent from iPhone On Feb 2, 2012, at 12:39, Francis Nugent Dixon <[email protected]> wrote: > Hi from beautiful Brittany, > > Thanks to all for suggestions. I finished up by trying my own > workaround. > > BUT, I don't know why the syntax "of this card" and > "of card xx" is accepted in the find command, but doesn't work. > > Would that be a real bug ? > > Secondly, the string I am looking for is in practically > every record of my stack, and I treat the cards one at > a time. I'm doing some complex (painful) syntax analysis > on tons of data in text files, to create a stack of cards. > > So I look for various character strings with a value after them. > > Thirdly, when I have "found" the strings, I use the "foundChunk" > command to set the strings to "empty" (i.e. remove them completely). > This aids the continuation of my data analysis. I need this command. > > So I have solved the problem by using the "offset" command, and > using the result + the length of the offset string to build a > "findChunk" string "char xx to yy of field zzz" and then I have > the ammunition to zap the field. > > I had many of these "find string" commands for many different > values, and wanted the minimum of change to my scripts > (written over many days) so that my scripts would work. > > Yes ! (Sigh) - I tried solving this with a function, but it had > so many facets, that I finally resolved the problems inline. > > So I replaced the following multiple instances of commands: > > find string "xxx" in field yyy of this card > if the result = "not found" then exit mouseUp > put the foundchunk into SaveChunk > -- Do stuff with the data > do "put empty into " & SaveChunk > > with four other commands : > > put offSet("xxx",field yyy) into HoldStart > if HoldStart = 0 then exit mouseUp > put the length of "xxx" into HoldStop > put "char " & HoldStart & " to " & HoldStop & " of field zzz" into > SaveChunk > do "put empty into " & SaveChunk > > Minimum Modification - maximum satisfaction ! > > But I'm sure lots of you guys can better my ineficient code ! > > -Francis > > > > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
