Re: A Question about Perform
Posted in 2004
Jonathan Leffler wrote: > > There isn't any way to do this - it is a weakness of both ISQL Perform > and I4GL CONSTRUCT statements. One of my cow-orkers asked about making CONSTRUCT yield a "NOT MATCHES" clause, and there isn't syntax for it. I proposed passing all constructed strings through a filter function which would (effectively) perform: s/ (matches ["'])!/not $1/ig which of course would be a fairly tedious loop in 4GL. We can also use a script to reliably inject this call into all 4GL code since it would be quite easy to detect the proper place. The nett result would be the ability of users to type: !A* then the construct would firstly treat that as a MATCHES and our function would take over. Now that I'm thinking about it, I think this trick could be easily applied to !A|B|C => NOT IN (.... !A:B => NOT BETWEEN ... Is there any chance to acually get this put into 4GL itself? PS - as I scan the book for even more possible tricks - it's enticing to allow the injection of a sub-select but that could get nasty very quickly...