Opened 11 years ago
Last modified 9 years ago
#2713 closed Bug
ByRef Copy Bug — at Version 1
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.3.11.5 | Severity: | None |
Keywords: | byRef | Cc: |
Description (last modified by Mat)
In the following script, the presence of ByRef causes $b to be a reference, not a copy.
Local $a[2] = [1, 2] test($a[0]) Func test(ByRef $foo) Local $b = $a $foo += 1 ConsoleWrite($a[0] & @LF) ConsoleWrite($b[0] & @LF) EndFunc ;==>test
Note: See
TracTickets for help on using
tickets.
This has been discussed here: http://www.autoitscript.com/forum/topic/161296-supposed-byref-bug/ (Link is to MVP section)
I've changed the code in the report to be much simpler, without the OPs attempt to write object oriented AutoIt without objects.