Function : Default parameters

Feature requests for future versions of Hollywood can be voiced here
Post Reply
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Function : Default parameters

Post by djrikki » 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.

Code: Select all

/* example */
Function Say(word = "Hello World!")
   DebugPrint(word)
EndFunction

Say("Hello Andreas!")
Say()
Output:

Code: Select all

Hello Andreas!
Hello World!
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com

User avatar
airsoftsoftwair
Posts: 2509
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany
Contact:

Re: Function : Default parameters

Post by airsoftsoftwair » Mon Apr 02, 2018 9:46 pm

Unlikely to happen because it'd require extensive work on the VM. There are ways to do it, however. See here: https://stackoverflow.com/questions/602 ... -arguments

Post Reply