TheGameCreators / AGK-Studio

3 stars 1 forks source link

[Feature Request] Optional parameters #869

Open adambiser opened 3 years ago

adambiser commented 3 years ago

Optional parameters would be nice. I know they've been mentioned in the forums before.

function MyFunction(Text as string, X as integer = 10, Y as integer = 15)
    // Do stuff.
endfunction
ThunderCat-Fr commented 3 years ago

As in Visual Basic (with optional reserved word)

adambiser commented 3 years ago

As in Visual Basic (with optional reserved word)

Even though I have a background in VB as well, I would prefer without having to say "optional" in addition to assigning a default value for every optional parameter. Seems overly verbose. However, I'd be happy however this functionality makes its way into the language.