SETTIMER definition is not complete

Share your ideas as to how the documentation can be improved.
joefiesta
Posts: 497
Joined: 24 Jan 2016, 13:54
Location: Pa., USA

SETTIMER definition is not complete

15 Feb 2021, 15:52

SETTIMER states:
Causes a subroutine to be launched automatically and repeatedly at a specified time interval.
This is incomplete. It should read:
Causes a subroutine, a function or a function object to be launched automatically and repeatedly at a specified time interval.
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: SETTIMER definition is not complete

17 Feb 2021, 05:58

i think subroutine refers to the piece of code the timer is meant to execute in general
not labels per se
joefiesta
Posts: 497
Joined: 24 Jan 2016, 13:54
Location: Pa., USA

Re: SETTIMER definition is not complete

17 Feb 2021, 09:36

@swagfag
So, do you think the definition should be:
Causes a piece of code the timer is meant to execute to be launched automatically and repeatedly at a specified time interval.
Isn't that rather ridiculous?

And SUBROUTINE does refer to labels (although a subroutine is certainly much more than just a label). A subroutine must have a label. A function does not have a label.
gregster
Posts: 8988
Joined: 30 Sep 2013, 06:48

Re: SETTIMER definition is not complete

17 Feb 2021, 09:48

generally, in programming, functions (and a number of other language constructs) are often referred to as subroutines.
But afaik, somewhere in the AHK docs, functions are described as just similar to subroutines (probably in order to differentiate them from AHK's labeled subroutines).

So, it depends what definition of subroutine we want to follow. By itself, as an umbrella term, it sounds correct - in the context of language usage in other AHK doc pages, it might be slightly inaccurate.

Return to “Suggestions on Documentation Improvements”

Who is online

Users browsing this forum: No registered users and 4 guests