Path: csiph.com!aioe.org!.POSTED.wIgm+2MIUUYkuZKIR0Uhug.user.gioia.aioe.org!not-for-mail From: "R.Wieser" Newsgroups: microsoft.public.scripting.vbscript Subject: Re: Overload a system function like FormatDateTime with a user-defined one ? Date: Sat, 11 May 2019 11:12:36 +0200 Organization: Aioe.org NNTP Server Lines: 28 Message-ID: References: NNTP-Posting-Host: wIgm+2MIUUYkuZKIR0Uhug.user.gioia.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.9.2 X-RFC2646: Format=Flowed; Original X-MSMail-Priority: Normal X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 Xref: csiph.com microsoft.public.scripting.vbscript:12149 Mayayana, > | I've been doing similar in VB_ projects for years by passing > | an action index to a single function to tell it what to do; > > Yes, I do that, too. Much less prone to confusion > than overloading. :-) Without looking at the docs, in what format does the 'FormatDateTime' function return the result when you call it with the value 2 as the second argument ? And have you ever programmed in DOS ? It uses "int" as the entry point for all system functions, using an index for a certain group followed by a sub-index for the actual function (and sometimes a few more indices too). Apart from a few you became to know by heart (because every program you wrote used them) you /always/ needed a "cheat sheet" to figure out the needed indices for the functions you didn't use all that often. I have absolutily /no/ desire to re-implement such a system in VBScript too. Sorry. Regards, Rudy Wieser