Compare Memorybocks

Any idea why

if mb1.stringvalue <> mb2.stringvalue then

fails with ‘more than one …’ message?

if mb1 <> mb2 then

appears to work but I’m not sure if that is comparing the address or ID of the memoryblocks rather than the contents

Hi @Jeff_Tullin

Have you tried using the offset and length values for StringValue? For example:

mb.StringValue(0,4) <> mb1.StringValue(0,4)

As for the second case, mb1 <> mb2, it compares the equality of the stored data in the MemoryBlocks.

No. Thats probably the issue.

mb1 <> mb2 compares the equality of the stored data

Thats all I need then, Thanks!