The failing code uses valid, allowable syntax.
Get help with using AutoHotkey and its commands and hotkeys
6 posts • Page 1 of 1
You must use ":=mod(..." in all three cases --> expression
TAC109 wrote:The failing code uses valid, allowable syntax.
See help, scripts, variables and expressions, expression operators table
Comma (multi-statement) [v1.0.46+]. Commas may be used to write multiple sub-expressions on a single line. This is most commonly used to group together multiple assignments or function calls. For example: x:=1, y+=2, ++index, func(). Such statements are executed in order from left to right. Note: A line that begins with a comma (or any other operator) is automatically appended to the line above it. See also: comma performance.
In v1.0.46.01+, when a comma is followed immediately by a variable and an equal sign, that equal sign is automatically treated as an assignment (:=). For example, all of the following are assignments: x:=1, y=2, a=b=c.
Last edited by TAC109 on 17 Jun 2015, 02:05, edited 1 time in total.
%y%isn't a variable, it's a reference.