Code: Select all
MsgBox, Long=0, String="", String="", Long=0, (WindowHandle, Body$, Title$, Flags) - Display an MessageBox
Long | DebuggerCheck | Unicode
TheFunction, Long, Long, String="hello", (value1, value2, string = "hello") - do something
String | DebuggerCheck | Unicode
Write only 1 function. Default param is given automatically (text replacement in function calls).
MsgBox() example would need to write 5 C functions (for 0,1,2,3,4 args), where 1 function would be enough
with default parameters. The old way with writing many functions for "[optional]" arguments is still there,
so both ways can co-exist for compatibility.
Not necessary to mix them IMO. Either use current way and write many functions or use new way with default parameters
and write one function for everything.
Tailbite would also benefit from it when tailbiting PB functions with default params. Instead generating many functions, you generate
only one function and set the default parameters in the .desc for the specific library.