Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#3267 closed Bug (Fixed)

ByRef parameter with unnamed temporary variables

Reported by: binu Owned by: Jos
Milestone: Component: Au3Check
Version: Severity: None
Keywords: ByRef, parameter, unnamed temporary, variables Cc:


#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

Func main()
	$var = "asdf"
	ConsoleWrite(">" & @CR)

	$var = "asdf"
	$var = ExampleOne($var)

	ConsoleWrite(">" & @CR)

	$var = "asdf"
EndFunc   ;==>main

Func ExampleOne(ByRef $var)
	ConsoleWrite($var & " > ExampleOne" & @CR)
	Return $var & " > ExampleOne"
EndFunc   ;==>ExampleOne

Func ExampleTwo(ByRef $var)
	ConsoleWrite($var & " > ExampleTwo" & @CR)
	Return $var & " > ExampleTwo"
EndFunc   ;==>ExampleTwo

From the AutoIt Help:
Note that not only a named variable can be passed for a ByRef parameter - unnamed temporary variables, such as function return values, may be passed as ByRef parameters as well.

Attachments (0)

Change History (4)

comment:1 Changed 8 years ago by Jos

  • Owner set to Jos
  • Status changed from new to accepted

comment:2 Changed 8 years ago by Jos

I will remove the warning for the next release.


comment:3 Changed 8 years ago by Jos

  • Milestone set to
  • Resolution set to Fixed
  • Status changed from accepted to closed

Fixed by revision [11787] in version:

comment:4 Changed 8 years ago by anonymous

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

as closed The owner will remain Jos.

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

Note: See TracTickets for help on using tickets.