问题
Every now and then i find a boolean variable named "flag", mostly by novice programmers. I always tell them every boolean is a flag, and variables should have meaningful names. So i was wondering what is the etymology behind the term "flag".
Maybe its something obvious, my guess is it comes from a military context, but i would like to know the real history behind it. And by the way i tried to sum it up in the title, but i'm making the question a bit lengthy because i get a warning about quality standards. Sorry for that.
Anyway, what's the story behind the "flag" term ?
来源:https://stackoverflow.com/questions/23505337/etymology-of-the-term-flag-in-programming