Subject how to handle missing optional arguments in a function
From Gaetano <gaetanodd@hotmail.com>
Date Fri, 2 Oct 2020 06:26:42 +1000
Newsgroups dbase.getting-started



Hi All,

I have customized one webclass.cc function to add a text msg to
the errorMessage function:

Function errorMessage( oErr, cMsg, cTitleBackColor, cTitleTextColor )

if you supply less than the total count of arguments, how does dBase
know which argument is supplied and which is omitted?

In other words, if I only want to supply cMsg or only a cTitleTextColor
but no cTitleBackColor, how to I do that? Is there a standard
placeholder for empty arguments?

would something like the following work?

errorMessage(,"my message",,"red")

If I have to test for argument types, how do I reference the "first
argument"?

Cheers,
Gaetano.