vsprintf or printf variable arguments

flamencofantasy via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Aug 5 13:29:56 PDT 2016


On Friday, 5 August 2016 at 19:21:38 UTC, Mark "J" Twain wrote:
> On Friday, 5 August 2016 at 08:32:42 UTC, kink wrote:
>> On Thursday, 4 August 2016 at 21:03:52 UTC, Mark "J" Twain 
>> [...]
>>
>> This has absolutely nothing to do with D as these are C 
>> functions, so you'd be better off asking this in another forum.
>
> Um, then I wonder why I am using D? Why does D even have C 
> stuff in it if it has ABSOLUTELY nothing to do with D?
>
>> Anyway, I have no idea why you'd want to construct the va_list 
>> manually.
>
> Of course you don't, do you have ESP? Do you need to see a 
> psychologist?
>
>> These vprintf() functions only exist so that other variadic 
>> functions can forward THEIR varargs - e.g.,
>>
>> extern(C) void myOldschoolPrintf(in char* format, ...)
>> {
>>   doSomethingSpecial();
>>   va_list myVarargs = va_start(format);
>>   vprintf(format, myVarargs);
>> }
>>
>> Note that va_list is highly platform-dependent, so filling the 
>> struct manually is a very bad idea.
>
> So? People do bad stuff all the time, you should know a lot 
> about that? Or are you Jesus?
>
> Ok, thanks for the help. I appreciate it! I know absolutely 
> nothing more than I did about the problem I asked. At least my 
> reply to my self works and accomplishes the task I posted about 
> in the first place.


Could you please stop changing your alias from;
Joerg Joergonson to Hiemlick Hiemlicker to Adam Sansier to Rufus 
Smith to Mark "J" Twain so that those who don't want to read you 
can filter you out once and for all.
Just pick one and stick with it!
Thanks!




More information about the Digitalmars-d-learn mailing list