Function : Default parameters
Posted: Sun Apr 01, 2018 1:24 pm
It would be helpful in some projects if we were able to specify default parameters on a Function statement something akin to ES6/ES2015 in JavaScript.
Output:
Code: Select all
/* example */
Function Say(word = "Hello World!")
DebugPrint(word)
EndFunction
Say("Hello Andreas!")
Say()
Code: Select all
Hello Andreas!
Hello World!