Modify ↓
#3267 closed Bug (Fixed)
ByRef parameter with unnamed temporary variables
| Reported by: | binu | Owned by: | Jos |
|---|---|---|---|
| Milestone: | 3.3.15.1 | Component: | Au3Check |
| Version: | 3.3.14.2 | Severity: | None |
| Keywords: | ByRef, parameter, unnamed temporary, variables | Cc: |
Description
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
;#AutoIt3Wrapper_Run_AU3Check=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
main()
Func main()
$var = "asdf"
ExampleOne($var)
ExampleTwo($var)
ConsoleWrite(">" & @CR)
$var = "asdf"
$var = ExampleOne($var)
ExampleTwo($var)
ConsoleWrite(">" & @CR)
$var = "asdf"
ExampleTwo(ExampleOne($var))
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 by , 10 years ago
| Owner: | set to |
|---|---|
| Status: | new → accepted |
comment:2 by , 10 years ago
comment:3 by , 10 years ago
| Milestone: | → 3.3.15.1 |
|---|---|
| Resolution: | → Fixed |
| Status: | accepted → closed |
Fixed by revision [11787] in version: 3.3.15.1
comment:4 by , 10 years ago
For those that want to test/use it already: https://www.autoitscript.com/autoit3/scite/download/beta_SciTE4AutoIt3/Au3Check.exe
Jos
Note:
See TracTickets
for help on using tickets.

I will remove the warning for the next release.
Jos