Reviewing logs - the order of conditions


#1

I was looking at this wiki page that provides help on debugging and reviewing Logs:

https://wiki.webcore.co/WCmore's_LogAndTrace

On the wiki page it shows yellow condition groups when trace is turned on.

My question is; why does the log show condition (2), happening before condition (1)? The same is true for (4) and (3).

Thanks, Ian


#2

In reference to my screenshot:

The log shows the exact order that webCoRE processed the piston…

  • First, it checks to see if “I Am Awake” switch is on…
  • If it is, then “Condition #1” evaluates as true…

The same goes with the next block.


Perhaps the underlying logic is better seen in this example:

pic

First it checks #4, then #5, and if both are true, then #3 will evaluate as true.


Note: I just edited the piston on the Wiki page to show this better…


#3

Thanks WCmore (as always). I guess this is just a little confusing when comparing to other codes but it makes sense it just changes the way I need to think… (ouch!).


#4

One of the beauties about studying a Full log is it really helps us to understand the flow of a piston…
(which of course, helps us to create better pistons in the future)

In my last post, take my snippet example:
#3 cannot be evaluated until after #4 and #5 have been checked first.


Note: If we change the “and” to “or”, then:
IF #4 is true, it immediately evaluates #3
(it has no need to check #5)