Modify

Opened 5 months ago

Last modified 5 months ago

#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 J-Paul Mesnage, 5 months ago

Owner: set to Jon
Status: newassigned

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

Modify Ticket

Action
as assigned The owner will remain Jon.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.