Skip to content

Update Functions.htm#765

Open
iPhilip wants to merge 1 commit intoAutoHotkey:v2from
iPhilip:patch-17
Open

Update Functions.htm#765
iPhilip wants to merge 1 commit intoAutoHotkey:v2from
iPhilip:patch-17

Conversation

@iPhilip
Copy link
Copy Markdown
Contributor

@iPhilip iPhilip commented Dec 27, 2025

Modified the example to be more consistent with its intended demonstration purpose: non-static local variables of the outer function are ignored.

Modified the example to be more consistent with its intended demonstration purpose: non-static local variables of the outer function are ignored.
@Lexikos
Copy link
Copy Markdown
Collaborator

Lexikos commented May 6, 2026

This is not useful, and misses part of the original intent.

The assignment already proves that non-local variables of the outer function are ignored.

Displaying x immediately after assigning it proves nothing. The inner MsgBox would display whatever value was just assigned, regardless of whether it was assigned to the outer x or the inner x.

The purpose of the inner MsgBox is to show that the function is Func and not Closure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants