Article 56SSS How to run something only once from within a loop?

How to run something only once from within a loop?

by
lucmove
from LinuxQuestions.org on (#56SSS)
I need to run a loop many times, possibly hundreds. Sometime along that, one certain value may change. The loop keeps running. How do I make sure that value won't be changed again?

For example:
x = 90;
y = 5;
if x > 100 then y = y * 3;

(now y = 15 and should never change again although x may keep increasing)

TIAlatest?d=yIl2AUoC8zA latest?i=2v4CRVrdi8A:LWB8DDJ-mkE:F7zBnMy latest?i=2v4CRVrdi8A:LWB8DDJ-mkE:V_sGLiP latest?d=qj6IDK7rITs latest?i=2v4CRVrdi8A:LWB8DDJ-mkE:gIN9vFw2v4CRVrdi8A
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments