Re: Macro to check that local variables are declared in a method? [Solved]

2018-04-30 Thread Bob Miller via 4D_Tech
RE> What I?m not sure how to do (well, I?m unwilling to spend the time, because WTH) is capture spaces within a variable name. If anyone puts spaces in a variable name, well, they deserve what they get. I also realized that constructions such as ARRAY TEXT($aMyTextArray;$ArraySize) contain

Re: Macro to check that local variables are declared in a method? [Solved]

2018-04-29 Thread Patrick Emanuel via 4D_Tech
Hi, I have this regex to find all kind of variable in QS_Toolbox. May it will help you to increase the impact of your method ;-) $PatternVariables:="(?mi-s)(\\b[[:alpha:]][\\w+]*\\b)[?=\\:|\\;|\\)|\\>|\\<|\\{|\\}|\\]|\\[|\\r|\\n]|(\\$[\\w+]*\\b)|(<>[[:alpha:]][\\w+]*\\b)" Patrick -

Re: Macro to check that local variables are declared in a method? [Solved]

2018-04-28 Thread John Baughman via 4D_Tech
> On Apr 27, 2018, at 12:17 PM, Bob Miller via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > RE> I don?t have a macro for you, but I?m curious to know why asking the > compiler to check the syntax isn?t enough? Another reason is that for some usages of a local variable starting with one of the

Re: Macro to check that local variables are declared in a method? [Solved]

2018-04-28 Thread Lee Hinde via 4D_Tech
I was looking at that string and testing it a bit more (after it’s been canonized, of course.) Underscores aren't captured in the original, which a lot of us use - e.g.e, $somestring_t This captures those: \$[_a-zA-Z0-9]* All I did was add the underscore between the []. What I’m not sure

Re: Macro to check that local variables are declared in a method? [Solved]

2018-04-27 Thread jim.dorrance--- via 4D_Tech
Wow! Useful, thanks. Sent from my iPhone > ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub:

Re: Macro to check that local variables are declared in a method? [Solved]

2018-04-27 Thread Bob Miller via 4D_Tech
Thanks to everyone for all the responses! I put the macro at the end of this posting. Cannon Smith inquired: RE> I don?t have a macro for you, but I?m curious to know why asking the compiler to check the syntax isn?t enough? 1. It may not be a syntactical problem; I may have simply forgotten