Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
>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.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement