Modify ↓
#4053 closed Feature Request (Duplicate)
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 (2)
comment:1 by , on Oct 19, 2025 at 7:42:08 AM
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:2 by , on Aug 24, 2026 at 3:28:25 PM
| Resolution: | → Duplicate |
|---|---|
| Status: | assigned → closed |
In fact this request is the same as #3540
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