Navigation:  MCL Reference > Arguments and Variables of MCL functions >

Optional Arguments

Print this Topic Previous pageReturn to chapter overviewNext page

Most arguments of MCL functions are optional. Required arguments are underlined in all syntax descriptions in this reference. For example, in the following function, all arguments are optional except nMCLExpr.

HrSum('nMCLExpr',nRaces,'fCondition',nDefaultValue,cIncluding)

 

If the arguments that you are going to omit are the rightmost ones, the commas between the arguments can be taken away. For example, the following two expressions are basically identical:

HrSum('HrWinTickets( )',3)

HrSum('HrWinTickets( )',3,,,)

 

If the arguments that you are going to omit are not the rightmost ones, you must keep the commas, for example:

HrSum('HrWinTickets( )',,'For HrFP( )=1')

 

For Visual FoxPro built-in functions, you can only omit rightmost optional parameters but not the ones in the middle. For example, the following function will result in error:

Trim('ABC. ',,[ ],[.])

 

You must rewrite it as:

Trim('ABC. ',0,[ ],[.])

 

 


Page url: http://www.racematenet.com/english/help/index.html?optional_arguments.htm