Modify ↓
Opened on Oct 18, 2025 at 3:24:26 AM
Last modified on Oct 19, 2025 at 7:42:08 AM
#4053 assigned Feature Request
Allow default values for ByRef parameters
| Reported by: | genius257 | Owned by: | Jon |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | Severity: | None | |
| Keywords: | byref, default, func, function, parameters | Cc: |
Description
Current behavior:
Func Example(ByRef $a=1) ; EndFunc
Output:
"{...}.au3" (1) : ==> Badly formatted "Func" statement.:
Func Example(ByRef $a=1)
Func Example(ByRef $a^ ERROR
Exit code: 1
Ticket #3892 uses this syntax in example code, but does not necessarily seem to be directly related
Attachments (0)
Change History (1)
comment:1 by , on Oct 19, 2025 at 7:42:08 AM
| Owner: | set to |
|---|---|
| Status: | new → assigned |
Note:
See TracTickets
for help on using tickets.

I confirm not related as the objectif is to pass the value with a keyword
Example(a=1)
in this case as there is no may parameter not useful
Back to your proposal when calling the variable must exist to be updated on the return
so I will leave to Jon the final answer but for me I cannot see to have it working