Re: calling convention stdcalll and cdecl call
* Igor Tandetnik:
"Alf P. Steinbach" <alfps@start.no> wrote in message
news:25WdnXEUbI2EwR_VnZ2dnUVZ_sudnZ2d@posted.comnet
* Alex Blekhman:
You'd find decimal number system problematic if you came from an
octal culture, being used to that.
According to my understanding of what a calling convention
consists of, your example is beyond the limits of __stdcall
capabilities because it requires new convention about the meaning
of parameters.
May be. But the point is that stdcall could easily have used this
technique.
Perhaps it could, but it doesn't ("not supported by tools").
Hence it's incorrect to say that stdcall cannot or could
not support variadic number of arguments (as Igor did)
I only stated that stdcall, *as it exists today*, cannot support
variadic functions.
I think what you mean is not that /stdcall/ /cannot/.
I think what you mean is /Visual C++/ /does not/.
Anwyay, the latter is correct, and the former is just nonsense.
Microsoft agrees:
http://msdn.microsoft.com/en-us/library/zxk0tw93.aspx
"The __stdcall calling convention is used to call Win32 API functions.
The callee cleans the stack, so the compiler makes vararg functions
__cdecl."
Microsoft does not say what you literally say.
But it might be that Microsoft says what you're intending to say.
:-)
I never stated that no modification of stdcall can possibly exist that
could support variadic functions (but it does appear to me that a few
such modifications I could think of are no better at supporting variadic
functions than an existing cdecl already is).
It could be argued that any modification to existing calling
convention - whether for the purpose of supporting variadic functions or
otherwise - should be given a different name (as was done with
__thiscall). You insist on calling it stdcall - and that's OK with me,
as long as you distinguish between stdcall as it is currently
implemented by VC compiler, and your hypothetical modified stdcall that
"could easily" exist (but, to the best of my knowledge, doesn't).
So it's relative, as most things are. ;-)
And thus perhaps calling participants that hold a different point of
view "stupid" or "liars" might not be such a good idea as it probably
seemed at the time. These terms sound pretty absolute to me.
Yes. When someone really annoys by being extraordinarily stupid I tend to say
so. But no, as I recall, wrt. you I chose to think you thickheaded/stupid,
which can be a temporal state, not an absolute property, rather than liar. Even
though in one example, which of course I pointed out, you did include 2 lies in
one very short snippet of text. On the other hand, prior to all of that, you did
effectively call me a whiner, by saying I had "complained" about something, and
as I recall also implying that in other words. You reap as you sow, my friend.
Just count yourself lucky that you didn't do that with some of the oldtimers
(those who to me are oldtimers).
I just wish the other two participants in this thread would stop
posting inane, idiotic, meaningless articles, engaging my
calling-names circuits all the time (or perhaps that's why they do
it, if so then it's not very nice of them).
Case in point.
Yes. :-) Happily it doesn't matter to much to me, at least not in these
out-of-the-way Microsoft groups. It's been a very long time since last fresh
Usenet discussion, so this has been very enjoyable.
Cheers,
- Alf
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?