Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.scripting.vbscript > #12147

Re: Overload a system function like FormatDateTime with a user-defined one ?

From "R.Wieser" <address@not.available>
Newsgroups microsoft.public.scripting.vbscript
Subject Re: Overload a system function like FormatDateTime with a user-defined one ?
Date 2019-05-11 09:39 +0200
Organization Aioe.org NNTP Server
Message-ID <qb5vds$1jqb$1@gioia.aioe.org> (permalink)
References (5 earlier) <qb3rme$5et$1@dont-email.me> <qb47sb$342$1@gioia.aioe.org> <qb4bfq$6j4$1@dont-email.me> <qb4hi4$1euo$3@gioia.aioe.org> <qb4j32$n9e$1@dont-email.me>

Show all headers | View raw


GS,

> Ok, I'll try to explain more clearly...
>
> My Format_DateTime$(iFormat%) function

And I'll stop you just there.  Using two functions with different names is 
NOT in any way what I asked for.

In my posted example you see two calls USING THE SAME FUNCTION NAME.  One of 
those calls is supposed to go to the system function, the other to a 
function I wrote myself.

/How/ that can be made possible is upto debate.  Nothing else.

> I'm just proposing a single multi-task function to do
> the same thing!

1) You should have made that a bit more clear.  Maybe like "I have no idea 
how to do what you're asking for but maybe you can use the following 
instead".  To which I than would have answered: (see #2).

2) It would be rather stupid to call that new function only to have it call 
the actual function instead of just calling the actual function directly.

The whole idea of overloading is to /extend the capabilities/ of a certain 
(build-in) function.   Definitily /not/ to just introduce complexity where 
none is needed.


As for the "something like it" I mentioned ?     That was in regard to when 
only a /replace/ of the the function would be possible (as it appears to be 
with VBScript), but than being able to call the replaced (build-in) function 
anyway (do you know how ?).  Like some other languages do by adding a 
certain prefix to the function name, which than always refers to the 
build-in function table.

But, maybe even by a much simpler "call the replaced function" (parent?) 
construction (which would also allow for the stacking of function 
replacements).

Do /I/ now have made myself clear ?

Regards,
Rudy Wieser

Back to microsoft.public.scripting.vbscript | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Overload a system function like FormatDateTime with a user-defined one ? "R.Wieser" <address@not.available> - 2019-05-09 09:23 +0200
  Re: Overload a system function like FormatDateTime with a user-defined one ? GS <gs@v.invalid> - 2019-05-09 05:20 -0400
    Re: Overload a system function like FormatDateTime with a user-defined one ? "R.Wieser" <address@not.available> - 2019-05-09 11:44 +0200
      Re: Overload a system function like FormatDateTime with a user-defined one ? GS <gs@v.invalid> - 2019-05-09 14:33 -0400
        Re: Overload a system function like FormatDateTime with a user-defined one ? "R.Wieser" <address@not.available> - 2019-05-10 09:15 +0200
          Re: Overload a system function like FormatDateTime with a user-defined one ? "Mayayana" <mayayana@invalid.nospam> - 2019-05-10 08:41 -0400
            Re: Overload a system function like FormatDateTime with a user-defined one ? "R.Wieser" <address@not.available> - 2019-05-10 18:11 +0200
              Re: Overload a system function like FormatDateTime with a user-defined one ? GS <gs@v.invalid> - 2019-05-10 13:13 -0400
                Re: Overload a system function like FormatDateTime with a user-defined one ? "R.Wieser" <address@not.available> - 2019-05-10 20:57 +0200
                Re: Overload a system function like FormatDateTime with a user-defined one ? GS <gs@v.invalid> - 2019-05-10 15:23 -0400
                Re: Overload a system function like FormatDateTime with a user-defined one ? "R.Wieser" <address@not.available> - 2019-05-11 09:39 +0200
                Re: Overload a system function like FormatDateTime with a user-defined one ? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-05-11 11:31 +0200
                Re: Overload a system function like FormatDateTime with a user-defined one ? "Mayayana" <mayayana@invalid.nospam> - 2019-05-11 06:59 -0400
              Re: Overload a system function like FormatDateTime with a user-defined one ? "Mayayana" <mayayana@invalid.nospam> - 2019-05-10 13:21 -0400
                Re: Overload a system function like FormatDateTime with a user-defined one ? GS <gs@v.invalid> - 2019-05-10 14:06 -0400
                Re: Overload a system function like FormatDateTime with a user-defined one ? "R.Wieser" <address@not.available> - 2019-05-10 20:52 +0200
                Re: Overload a system function like FormatDateTime with a user-defined one ? "Mayayana" <mayayana@invalid.nospam> - 2019-05-10 15:45 -0400
                Re: Overload a system function like FormatDateTime with a user-defined one ? GS <gs@v.invalid> - 2019-05-10 15:53 -0400
                Re: Overload a system function like FormatDateTime with a user-defined one ? "R.Wieser" <address@not.available> - 2019-05-11 09:59 +0200
                Re: Overload a system function like FormatDateTime with a user-defined one ? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-05-11 11:31 +0200
                Re: Overload a system function like FormatDateTime with a user-defined one ? GS <gs@v.invalid> - 2019-05-11 14:47 -0400
                Re: Overload a system function like FormatDateTime with a user-defined one ? GS <gs@v.invalid> - 2019-05-11 14:56 -0400
                Re: Overload a system function like FormatDateTime with a user-defined one ? "R.Wieser" <address@not.available> - 2019-05-11 22:19 +0200
                Re: Overload a system function like FormatDateTime with a user-defined one ? "R.Wieser" <address@not.available> - 2019-05-12 09:24 +0200
                Re: Overload a system function like FormatDateTime with a user-defined one ? "Mayayana" <mayayana@invalid.nospam> - 2019-05-11 16:36 -0400
                Re: Overload a system function like FormatDateTime with a user-defined one ? GS <gs@v.invalid> - 2019-05-11 17:55 -0400
                Re: Overload a system function like FormatDateTime with a user-defined one ? "R.Wieser" <address@not.available> - 2019-05-11 11:12 +0200
                Re: Overload a system function like FormatDateTime with a user-defined one ? "Mayayana" <mayayana@invalid.nospam> - 2019-05-11 07:49 -0400
                Re: Overload a system function like FormatDateTime with a user-defined one ? "R.Wieser" <address@not.available> - 2019-05-11 15:12 +0200
                Re: Overload a system function like FormatDateTime with a user-defined one ? "R.Wieser" <address@not.available> - 2019-05-10 20:46 +0200
          Re: Overload a system function like FormatDateTime with a user-defined one ? GS <gs@v.invalid> - 2019-05-10 13:28 -0400
  Re: Overload a system function like FormatDateTime with a user-defined one ? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-05-09 11:39 +0200

csiph-web