If statement confusion

More
3 years 11 months ago #256652 by masterjuggler
I've been reading about o codes and parameters so I can edit or make macros, and I've been struggling to figure out what the following subroutine from my toolchange macro is doing: 
Code:
o<010> if [1 EQ 1]   ...some code o<010> endif
It looks like it's always going to be true because of course 1 is equal to 1. There's no # to indicate a parameter. What am I missing?

Please Log in to join the conversation.

More
3 years 11 months ago #256664 by cmorley
Replied by cmorley on topic If statement confusion
You are absolutely right, it will always run.
It's probably just left over from a code change that never got removed.

Please Log in to join the conversation.

More
3 years 11 months ago #256672 by andypugh
Replied by andypugh on topic If statement confusion
This is a way to turn on or off a block of code. You would edit the file to be "If 1 = 0" to disable that block.

I am actually a bit more puzzled by the O<010> structure, apparently using the named-block syntax with a numerical value. It works, I suppose, but looks strange.

Please Log in to join the conversation.

More
3 years 11 months ago #256681 by masterjuggler
Oh, well that's anticlimactic lol. Thanks for clarifying.

I'm not really sure why that subroutine is numbered 010, it's from the probe basic set of macros and subroutines. Must have made sense to them at the time.

Please Log in to join the conversation.

Time to create page: 0.083 seconds
Powered by Kunena Forum