Harlowe - "_string is not in $array" not working

Twine Version: 2.3.8
Story Format: Harlowe 3.1.0

(find: _aString where _aString is not in $anArray, ...$anotherArray)

Using the above code yields the following two errors:

inVarRef is not defined


There isn't a temp variable named _undefined in this place.

If I change the code to use “is in” instead of “is not in”, then it works (but doesn’t do what I want).

According to examples in the official documentation, using “is not in” should work. See the second example for the (all-pass: ) macro: https://twine2.neocities.org/#macro_all-pass

Any help or advice welcome. Thank you.

So, after a bit of investigation, I found Harlowe’s README on bitbucket. It says, for 3.2.0 which is unreleased:

Added the is not in operator - $a is not in $b is a more intelligible phrasing for not ($a is in $b).

I guess, despite the Harlowe 3.1.0 manual, is not in isn’t implemented. I changed to (find: _aString where not (_aString is in $anArray), ...$anotherArray), and it seems to work.

The Array data section of the Harlowe (v3.1.0) manual lists the operators that can used with Arrays, and currently there is no is not in operator.

You have discovered that you will need to use the not operator to flip the true / false Boolean result of an is in sub-expression. eg. your…

(find: _aString where not (_aString is in $anArray), ...$anotherArray)