[AccessD] Checking for Optional Parameters

John Colby jwcolby at gmail.com
Wed Jan 25 12:39:17 CST 2023


I don't.  They would be a good practice since if you use a naming
convention such as intPersonAge the name is displayed as well as the data
type.  Mostly I just use regular params.

On Tue, Jan 24, 2023 at 9:00 PM Arthur Fuller <fuller.artful at gmail.com>
wrote:

> Hi John et. al.,
>
> Actually I knew that already. What I was trying to ask is whether you folks
> use them in practice, or not.
>
> On Tue, Jan 24, 2023 at 5:21 PM John Colby <jwcolby at gmail.com> wrote:
>
> > Named params allow you to pass them in any order because you now use the
> > syntax "ParamA - 1234", IOW you can actually tell the function which
> params
> > you are passing in what order by specifying the name.
> >
> > On Tue, Jan 24, 2023 at 7:47 AM Arthur Fuller <fuller.artful at gmail.com>
> > wrote:
> >
> > > I keep forgetting which check to use to determine whether or not an
> > > optional parameter was passed to a function.
> > >
> > > <code>
> > > Function myFunc( Optional d as Date ) as <whatever>
> > > 'is it:
> > > If IsMissing( d) or
> > > If IsNull(d) or ?
> > > </code>
> > >
> > > Side question: As a matter of coding style, do you use named parameters
> > in
> > > your own functions (i.e. as in, say, a call to MsgBox, which gives you
> > that
> > > prompt that walks you through the syntax as you type)?
> > >
> > > --
> > > Arthur
> > > --
> > > AccessD mailing list
> > > AccessD at databaseadvisors.com
> > > https://databaseadvisors.com/mailman/listinfo/accessd
> > > Website: http://www.databaseadvisors.com
> > >
> >
> >
> > --
> > John W. Colby
> > Colby Consulting
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > https://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
>
>
> --
> Arthur
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


-- 
John W. Colby
Colby Consulting


More information about the AccessD mailing list