On 3/19/06 2:12 PM, "Geoff Canyon" <[EMAIL PROTECTED]> wrote:
> Checking the first word of each line is (I believe) certain, and is > still reasonably fast (takes less than twice as long as the filter > command in informal testing). > > Unfortunately for anyone attempting this task, this is a perfectly > valid script: > > /* this is a comment > as is this */on mouseUp > answer "yes" > end mouseUp > > I don't know of a good way around that, so I have ignored it thus > far ;-) Here's a way: on mouseUp put removeBlockComments(the script of me) end mouseUp /* this is a comment as is this */function removeBlockComments pText put pText into tText put offset("/*",tText) into tOffset if tOffset > 0 then delete char tOffset to tOffset + offset("*/",tText,tOffset) + 1 of tText put removeBlockComments(tText) into tText end if return tText end removeBlockComments -- Dick _______________________________________________ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution