"""
ARGUMENT
Describes the arguments used in a custom function, which is a type of macro,
or in a subroutine. A custom function or subroutine must contain one
ARGUMENT function for each argument in the macro itself
"""
As a C API developer, you use REGISTER where a macro sheet developer would
have used ARGUMENT.
The "16384 bug" can
AFAIK not be avoided. The "workaround" would be to
examine the input range of a reference XLOPER (R type) and guess what the
user had in mind -- or issue at least a warning (watch out for ranges
starting at 0 with exactly 16384 columns - that shouldn't happen so often).
I would avoid parsing the formula. You would also need to to consider named
ranges etc. Instead I would use the R type only when necessary, since I
prefer the #VALUE error with the P and K types over the (silent) bug with
the R type.
Jens.
--
Jens Thiel * Willy-Brandt-Allee 10 * D-53113 Bonn * +49 228 5400124
http://jens-thiel.de/ http://ManagedXLL.net/ http://QuantLib.net/
"Jerry W. Lewis" wrote in message
...
Thank you for your response, but could you please clarify it? Are you
saying that:
- xlfArgument is not supported in the API (in which case, I wonder why
the constant is defined in xlCall.h)?
- you personally do not see why anyone would use it?
If the latter, I may ultimately come to the same conclusion, once I know
how to use it. Meanwhile I am grasping at straws trying to find some
way around the "16384 bug" in passing arguments from Excel to C (see
unanswered question in separate thread of that title). That particular
bug does not impact =ARGUMENT() in Excel4 macros, so I wondered whether
it might be the basis of a workaround.
I suppose I could parse the entire formula from xlfGetCell
http://groups.google.com/groups?selm...A%40wanadoo.fr
but that seems overly painful.
Jerry
Jens Thiel wrote:
You do not use it at all! ARGUMENT doesn't make sense in the C API.
Jens.
--
Jens Thiel * Willy-Brandt-Allee 10 * D-53113 Bonn * +49 228 5400124
http://jens-thiel.de/ http://ManagedXLL.net/ http://QuantLib.net/
"Jerry W. Lewis" wrote in message
...
How does one use Excel4(xlfArgument, ...) in the C API?
XLOPER xArgRef;
Excel4(xlfArgument, &xArgRef, 1, TempInt(8));
returns xlretFailed.
Jerry