Re: Can one function get another's ParamArray?

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



You might also need to handle array constants:

abc,def,ghi(jkl(mno,{3,4,5;6,7,8},xyz)),pqr

and possibly multi-area ranges (I would probably ignore these since they
don't work properly as function parameters in most Excel versions).

Charles
___________________________________
The Excel Calculation Site
http://www.decisionmodels.com

"Jim Luedke" <baobob@xxxxxxxxxxx> wrote in message
news:fd7168bb-ec3d-475a-98fc-c50d7ef0636b@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Rick, Charles:

Thanks very much for reply.

The more I think about it, the more I realize I prob. shouldn't have
gotten involved in what values come alive at what time; and might
instead have titled this thread, "Can Excel parse a function's param
string for you?"

Anyway, it's now moot. Who said necessity is the mother of invention?
(Frank Zappa?)

Because I've just written the code to parse a function's param string.

It wasn't easy, but it wasn't as difficult as I'd feared either. You
need about a half-dozen simple subroutines. No recursion seems to be
needed.

Unless I'm mistaken, there are 3 basic cases you have to deal with:

1. String w/out parens, and/or comma-delimited params only, a piece of
cake: abc,def,ghi

2. String with paren-delimited params but no CDP's, also pretty easy
(altho' your initial cut *cannot* of course be by commas. You must
locate the first left paren, then call find its balancing right paren,
and go from there): abc(def(ghi,jkl)),mno(pqr)

3. String with both paren- and comma-delimited params--not as easy,
but again, not that much more difficult than 2. All you do is, having
located the first left paren, which already did, you also see if it is
preceded by a comma. If so, then you know you've got CDP's preceding
your PDP's: abc,def,ghi(jkl(mno)),pqr

I will post it in this group as soon as it's tested a bit; hopefully
in a day or two.

Thanks again.

***



.



Relevant Pages

  • Re: Can one function get anothers ParamArray?
    ... Because I've just written the code to parse a function's param string. ... String w/out parens, and/or comma-delimited params only, a piece of ... then you know you've got CDP's preceding ...
    (microsoft.public.excel.programming)
  • Re: Graph traversieren wie ein Petri-Netz
    ... @param strValue zu prüfender String ... public static final boolean empty{ ... @param strBuffValue zu prüfender StringBuffer ...
    (de.comp.lang.java)
  • Re: Hashtable question
    ... * @param modelName is a filename less the .pim extension where the ... public void load() throws IOException { ... public void add(String keyString, Item item) ... * @param keyString the string to lookup by. ...
    (comp.lang.java.programmer)
  • Re: which JAR to use ?
    ... scan for a string that leads into the piece you want with indexOf. ... public static String getWantedCurrencies throws IOException ... * @param result Results to save, ... public static String get(String websiteURL, String relativeURL, ...
    (comp.lang.java.programmer)
  • Re: Sencha Touch--Support 2 browsers in just 228K!
    ... this particular script is so awful that anyone who could ... These functions are available on every String object. ... if (!dom) { ... @param o The object with the attributes ...
    (comp.lang.javascript)