Shop Learn P1 Docs P2 Docs
Comparing an array to non-array should generate a warning. — Parallax Forums

Comparing an array to non-array should generate a warning.

This simple code:

dim a as ulong(4)
dim b as ulong

a(0)=1
b=2
if a=b then b=3

compiles without a warning and I didn't even know what this does (except it makes a hard to find error in a bigger piece of code)

What is the result of comparing array to non-array? A warning should be generated there ("dont do it unless you really know how this works")

Comments

  • ersmithersmith Posts: 5,404

    Using just an array in a comparison will test against the address of the array. There should have been a warning there, I'll add it.

Sign In or Register to comment.