Etymology of the term “flag” in programming [closed]

牧云@^-^@ 提交于 2019-12-10 14:50:00

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!