Note that there are some explanatory texts on larger screens.

plurals
  1. USGyhth
    primarykey
    data
    text
    plurals
    1. COIn that, it'll never set it to zero as that's the code that follows, and since it'll never be both less than 0 and greater than 1000, it'll never, ever set it to 0. It makes sense if he wanted to make it zero if either of those conditions is met (0 Minimum, 1000 score is max I assume), but that's why you'd use an OR (||) Operator, not an AND (&&). Code after an if, like read = 0, only executes if the if block returns true. Read < 0 && Read > 1000 will never return true, therefore, it'll never set read to 0. Same with the others.
      singulars
    2. COif (read < 0 && read > 1000): As you said you're just learning, a tip is that this will never, ever be the case. What you're asking here is like, "Is read less than 0, but also more than 1000, at the exact same time?" || should be used instead of &&. && means "If this AND this", || means "If this, or this". || in your case changes it to, "If read is less than zero, or it's more than 1000, do this", which is possible, as no number in Math is both less than zero, but more than 1000. Note: | is shift + \ key, and is called a "Pipe"
      singulars
    3. COThat's exactly what I was trying to do with the application - one word instance, of which there are multiple documents inside, and it resulted in the odd behavior of Word & Word + Document opening. Somehow, I just retried the application after being out of the office, and suddenly it all works as intended without explanation. Not sure if it was just a weird fluke that required a reboot or what, but it's all working now.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload