Maybe this has something todo with var-arg-functions?
tailbite docs wrote:
You can make your function accept variable arguments. To do so, you must include two or more ProcedureDLL's with the same name and an index number:
Code: Select all
ProcedureDLL MyFunction(arg1, arg2)
result = Pow(arg1, arg2)
ProcedureReturn result
EndProcedure
ProcedureDLL MyFunction2(arg1, arg2, arg3)
result = Pow(arg1, arg2)/arg3
ProcedureReturn result
EndProcedure
tailbite docs wrote:
To be considered as different versions of the same function with different argument number, the arguments names and types must coincide between them; otherwise, both functions will be considered different functions and processed that way.
After the library is made, and the compiler restarted from the PureBasic editor, if you type MyFunction( in the PureBasic editor, the status window will show:
tailbite docs wrote:
And you'll be able to call the function with two or three arguments. You can make as many versions as you want, with a different number of arguments, as long as you follow the mentioned rules.
Good programmers don't comment their code. It was hard to write, should be hard to read.