Posted Sat, 18 Apr 2020 01:54:53 GMT by

We have noticed a difference between v10 (specifically v10.7) and v11 (v11.1, and 11.3) in how variables of type Auto are interpreted at runtime.  In general, v11 seems more strict about data types, and is more likely to treat Auto type variables as if they are text, even when they contain only integers.  We have worked around this by explicitly setting the type to Number on many variables that worked OK on v10 as Auto type.

This shows up when you compare the value of two variables.  An Auto variable that contains an integer value will not equal a Number variable with the same value (eg, v11 says 1<>1), or an Auto variable with a larger integer that begins with a highest-order digit that is smaller than than the highest-order digit of a smaller value with be evaluated as larger (eg, v11 says 2000 < 7).

Attached is a test workflow that demonstrates this effect.   When I run it on v11.1 or v11.3, amid many comparisons where 1 = 1, the two surprising lines of output are:

4/17/2020 10:35:45 AM, aSharedAutoVar (1) > nInternalNumberVar (1)
4/17/2020 10:35:45 AM, nSharedNumberVar (1) < aInternalAutoVar (1)

This issue has been acknowledged as bug 24374 by AutoMate support.

Posted Sat, 18 Apr 2020 02:15:20 GMT by

This updates an earlier thread on the Tasks, Workflows subforum:

Posted Tue, 22 Jun 2021 03:00:29 GMT by

Even though I've been dealing with this for almost two years, it bit me again today!  I migrated an old testing workflow, and it slid into an infinite loop.  Eventually I realized that the two variables I was comparing in the loop condition were not declared with explicit types, so that the one that was getting incremented always compared as less than the second var.  (Numeric) 2700, 2750, 2800, etc. were always less than (string) 2741!

Infinite loop? Make sure your variable types are declared!

You must be signed in to post in this forum.