|
Defining FunctionsA function of N dummy arguments is defined by: func func_name(dummy1, dummy2, ..., dummyN) If the function has no dummy arguments, the first line of the definition should read: func func_name(void) Mark output parameters with a &, as dummy2 here: func func_name(dummy1, &dummy2, dummy3) If the function will take keyword arguments, they must be listed after all positional arguments and marked by a =: func func_name(..., dummyN, key1=, ..., keyN=) If the function allows an indeterminate number of positional arguments (beyond those which can be named), place the special symbol .. after the final dummy argument, but before the first keyword. For example, to define a function which takes one positional argument, followed by an indeterminate number of positional arguments, and one keyword, use: func func_name(dummy1, .., key1=)
|