Ph0enixKM / Amber

💎 Amber the programming language compiled to bash
https://amber-lang.com
GNU General Public License v3.0
3.54k stars 70 forks source link

✨ Function optional arguments #124

Open Ph0enixKM opened 1 month ago

Ph0enixKM commented 1 month ago

Add optional arguments to functions. Here is an example syntax:

fun foo(arg1, arg2 = false) {
  // Code
}

If no value is provided, then the values automatically default to what was assigned in the function parameters

ramseyharrison commented 5 days ago

Is this issue still available? I think I'd be able to complete it.

Mte90 commented 5 days ago

It it still open :-) @ramseyharrison

ramseyharrison commented 2 days ago

Here's a pull request regarding the feature, let me know what you think when you get the chance. https://github.com/Ph0enixKM/Amber/pull/260