Modify ↓
#2634 closed Feature Request (Fixed)
Treat keyword Default like an unset optional parameter
| Reported by: | water | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | Severity: | None | |
| Keywords: | Default optional parameter | Cc: |
Description
When keyword Default is passed to a function for an optional parameter it should be replaced by the default value for this parameter.
This would save a lot of statements in many UDFs to set the value of a parameter to the default value as defined in the Func statement for optional parameters.
Example: The MsgBox should always display 1 for P1 even when passed as keyword Default.
_Test() _Test(Default) Func _Test($P1 = 1, $P2 = 2) MsgBox(0, "Parameters", "P1: " & $P1 & @CRLF & "P2: " & $P2) EndFunc
Has been discussed here: http://www.autoitscript.com/forum/topic/139892-enhance-autoit-udfs/page-5#entry995563
Attachments (0)
Change History (3)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
| Resolution: | → Fixed |
|---|---|
| Status: | new → closed |
I agree, I can't remember when ...
comment:3 by , 11 years ago
Please consider if this change do not need some more description in HelpFile
Note:
See TracTickets
for help on using tickets.

is it completed now ?