Example:
When the following script (callee.ahk)
Code: Select all
global x
global y
callee_set(1,2)
callee_set(x_new, y_new) {
x:= x_new
y:= y_new
}
callee_tell() {
MsgBox x=%x%`, y=%y%
}
Code: Select all
#Warn ; will warn that callee_set is never executed
callee_tell()
(This extremely simplified example might tempt the reply “Just put the first three lines of callee.ahk in caller.ahk”. But in reality that would be an ugly hack – a gross violation of some of the most fundamental coding principles, such as ‘Don’t repeat yourself’ and the ‘Single Responsibility Principle’.)