Re: Can this be automated in the VBE?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



RB Smissaert wrote:
It is not the function itself that is the problem, but the lines of code that call the Function or Sub.
Arguments will have to match and this can't be a simple find and replace.
....

Arguments will have to match what? The dummy and actual argument association is positional, not by variable name.

There should be only one function statement and N calls/references.

How many references are there as a ballpark estimate?

If, of course, one were in a hurry to get something working owing to deadlines or somesuch, the answer would be Ralph's--make the routine w/ the new number of arguments a new function and change the existing routine to call it, passing the required ones--essentially the whole problem fixed in two edits and then the rest can be dealt with at leisure.

If the number of variables used in the call is relatively small and there are more than one instance of each, it might be possible in a reasonable time to simply create the substitution pattern on the fly from a sequential search for the call/reference. If there are still too many to even do that, a fully-automated technique would require the pattern-matching engine to push the arguments on a stack in order to then push them into the replacement string.

On consideration, I don't recall I've done something like that in 30 years that I can recall since "once upon a time" w/ the old DEC TECO editor when we did a major code conversion from a CDC system to an early desktop coprocessor i960 system. Consequently, while I'm sure there must be some, for PC, I don't have a direct link.

I'd expect emacs or some similar would have a capability. I'm pretty sure I could write a macro relatively quickly w/ my old Brief editor using it's search facility...

On Windows, I've evaluated Zeus for its Brief keymapping, but I've not tried its macro facility -- it's not compatible w/ Brief, unfortunately.

--dpb
.



Relevant Pages

  • Re: "Fair (hah) and Balanced (giggle)"
    ... squeeze, push and twist. ... The pain of this, I'm told, is beyond anything that can ... Can't recall if it was Mongo, the dawrf detective, or another little ...
    (rec.arts.sf.fandom)
  • Re: 1970s car advert
    ... The 1948 Chrysler product on which I took my Connecticut driver's license test had something like that, but I don't recall what you are mentioning on my father's 1953 Dodge. ... I do remember a buddy's father getting a shiny new '57 DeSoto and on it was the first push button shifter I had ever seen. ...
    (rec.boats)
  • Re: borland.public.delphi.software-testing
    ... Sean Dockery wrote: ... > I recall a thread in this newsgroup about creating a new group based ... Whatever happened to the push to do so? ...
    (borland.public.delphi.non-technical)
  • Re: Awnings
    ... I don't recall which brand, but my mother has a motorized one about 25' long ... Just push a button and it opens, ...
    (rec.outdoors.rv-travel)