From: "Dave Guyer"
I have written a macro that does various tests of software
maintainablity. One that I have not yet written is to determine the
length of procedures and triggers. Several simple possibilities
exist:
procedure foo:
end.
procedure foo2:
end procedure.
on do:
end.
These are easily handled with:
find ("{procedure}|{end procedure}|{on}|{^end}", "igwxv")
But how do I find the correct end in the following?
procedure foo3:
end.
procedure foo4:
on do:
end.
on do:
end.
on do:
end.
end.
on do:
end.
Several solutions would answer the problem. (1) Modify
the function list macro to find the "end" of the function or trigger
and give me a line-count in the compressed view. This sounds like
more work than I really want to do, but I am open to it because it
would be a cleaner user interface.
(2) Learn to use regular expressions so that when the procedure or on
keyword is found, the number of spaces after ^ is used to find the
corresponding end. This would display the correct end immediately
after the line with the procedure or on keyword.
(3) Modify the function list macro to do #2 above.
I will be pleased to receive other possibilities or pointers on how
to best do any of the above. Thanks in advance, and sorry about the
size of this message!
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)
|