I had this
return $(check-age-name-date($File) -or $(check-name-debugtxt($File) -and check-age-last-mod($File)))
looks very straight-forward to me, but I had to change it to:
if(check-age-name-date($File)) {
return $True
} else {
if(check-name-debugtxt($File)){
if(check-age-last-mod($File)){
return $True
}else{
return $False
}
} else {
return $False
}
}
it just never executed check-age-last-mod. If check-age-name-date was false and check-name-debugtxt was true, it just returns true without invoking check-age-last-mod at all!!! What's going on here?
To clarify, the first piece of code is broken, the second one works, but is way longer. I just want explanation, because I'm surely missing something fundamental here. I'm not comfortable using language where I don't understand it's predicate logic.