[AccessD] Parameter (argument) order

Arthur Fuller fuller.artful at gmail.com
Thu Feb 16 10:08:18 CST 2023


I thought not. On the other hand, it does make sense to pattern my own
functions after the conventions established by existing functions, such as
Instr() or Mid(), etc.

According to Microsoft Learn:
You use the ParamArray keyword to denote a parameter array. The array must
be declared as an array of type Variant,
and it must be the last argument in the procedure definition.

The thing that bugs me is that the only way to pass an array is by using
ParamArray, which must be the last argument. Not that I care about the
order, and it makes sense that it must be the last argument, but now I want
to experiment and see whether I can pass two parameter arrays, say to a
function called arrCompare(a1, a2) As Boolean. In C or C++ it's easy. In
VBA, not so much. Still thinking this out.

I think it's time that I began investigating how to create DLLs in C and/or
C++ for use in VBA.

On Wed, Feb 15, 2023 at 10:42 PM Stuart McLachlan <stuart at lexacorp.com.pg>
wrote:

> It makes no difference at all
>
> On 15 Feb 2023 at 18:34, Arthur Fuller wrote:
>
> > Given any function F( arg1 as whatever, arg2 as whatever, arg3 as
> > whatever), is there any reason to choose one or another order of the
> args?
> > Or is it just a whim of the programmer at the moment of creation? Let us
> > suppose that args 1 and 3 are Longs, and arg2 is a string.
> >
> > Opinions invited.
> >
> > --
> > Arthur
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > https://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


-- 
Arthur


More information about the AccessD mailing list