I saw a code, where a colon was used inside a function declaration:
DoWork(Param1:Param2)
I know that a colon is for inheritance: class Child: Parent
But, what is the purpose of the colon when it used before variable?
EDIT I've corrected the question
Named optional arguments
Its so you can have an optional number of arguments supplied, but the compiler needs to know which arguments to marry up to which parameters, otherwise defaults will be used for the others.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With