You could also do "a <> -1". This is more of the proper reinterpretation of your original code.
This is not a bug so much as an issue of how things get parsed. The precedence of different operators (Not, And, Or, ==, <>, etc.) needs to be known if you want to write logical expressions without parenthesis.
And there isn't any documentation about the operator precedence that AppGameKit Basic uses. We cannot assume the same as C++ (MS Visual Basic does not use the same precedence as Ansi C++, for instance).
Further googling found an FE post (from the closed forum) that describes AppGameKit Basic as using BBC Basic (?). And it puts unary+- and Not as higher precedence than comparisons (<,>,<>,==,>=,<=). So your original statement was being parsed the way I suspected as: (Not a) = -1
Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master