Purpose of nop statement in a loop

I am converting some Pan6 databases to PanX. One procedure, obviously written by an experienced and capable coder, whose identity is no longer known, has two lengthy loop/until blocks. Each of the loops begins with an nop statement.

Does anyone know the purpose of using nop? Why would somebody have put this into their procedure?

What’s the difference between this and a wait 0 statement?

There used to be a bug in loops, which I believe you reported, where it would restart the loop every 32nd time. Putting a nop in that place was a work around.

A nop is a command to do nothing and move on to the next statement. Wait 0 is a command to wait for the next pass of the run loop before resuming.

Thanks.

But this nop was used by someone in some very old code in Pan6. Was that same bug present in Pan6?

Not in Panorama 6. There may have been a reason that made sense in some ancient version, but I suspect it was just a personal quirk of this unknown programmer.

1 Like