![]() Optional ParametersHow to deal with BF's optional function parameters
| |||
|
Optional parameters are parameters which are not required. In a function they are always at the end of the function's argument list. You simply do not put anything into them, by either:
Putting in zero for an optional parameter is actually specifying its value as zero and overriding the fact that its optional. If there are two optional parameters at the end of a function, and you only want one to be optional, then that's easy provided that you want to specify the penultimate one and leave the last one optional. You just stop the list after the penultimate one. If you want to make the penultimate one optional and specify the last one, you can do this by leaving nothing where the argument should be, e.g. Level(2001,2000,2010,100,,1). If you are in doubt, then specify all the parameters, and if the function gives an error or an odd result, invoke the Trace facility from the menu for more diagnostic information. |