General information
Category:
Coding, syntax & commands
>However, WITH / ENDWITH is a little messier -- um, a lot messier -- since you need to find the matching ENDWITH for each WITH. Have not figured out how to do that. Once I can do so for a given PROC or METHOD, I should be able to do so for all of them as described in the thread.
should not be too difficult -- move the method/program into an array with ALINES(). Initialize a WITH counter to zero. Then loop through each array element (code line) and perform an ALLTRIM() to remove spaces and tabs. On each line, then do a case -- check for leading WITH (with a space), if found increment the WITH counter; if a ENDWITH is found, then decrement the WITH counter. If a RETURN is found and the with counter is greater than zero, then the RETURN is inside a WITH-ENDWITH construct.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only