Modify

Opened 3 weeks ago

Last modified 3 weeks 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 Changed 3 weeks ago by Jpm

  • Owner set to Jon
  • Status changed from new to assigned

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

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as assigned The owner will remain Jon.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.