468,491 Members | 1,918 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,491 developers. It's quick & easy.

why foo and bar

in c/c++ programming people often call their variables foo and bar

why ?

Sep 4 '06 #1
11 7402
Heinrich Pumpernickel wrote:
in c/c++ programming people often call their variables foo and bar

why ?
<http://www.catb.org/jargon/html/F/foo.html>

Robert Gamble

Sep 4 '06 #2
On Sun, 03 Sep 2006 22:02:57 -0700, Heinrich Pumpernickel wrote:
in c/c++ programming people often call their variables foo and bar

why ?
fucked up beyond all recognition

--
Lars Rune Nøstdal
http://lars.nostdal.org/

Sep 4 '06 #3
Lars Rune Nøstdal wrote:
On Sun, 03 Sep 2006 22:02:57 -0700, Heinrich Pumpernickel wrote:
>in c/c++ programming people often call their variables foo and bar

why ?

fucked up beyond all recognition
Slightly off topic but the first time I heard this referenced was in
Saving Private Ryan. As an in-joke amongst the men, excluding the new guy.

--
Reclaim Your Inbox! http://www.mozilla.org/products/thunderbird
Sep 4 '06 #4
Heinrich Pumpernickel wrote:
>
in c/c++ programming people often call their variables foo and bar

why ?
Because the earliest c programmers were devoted readers of the '30s
comic strip which featured Smokey and the FooFighters. It's a
living memorial.

--
Some informative links:
news:news.announce.newusers
http://www.geocities.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html
Sep 4 '06 #5
Lars Rune Nøstdal wrote:
On Sun, 03 Sep 2006 22:02:57 -0700, Heinrich Pumpernickel wrote:
>in c/c++ programming people often call their variables foo and bar

why ?

fucked up beyond all recognition
The last word is 'repair' as I learned it years ago. US Military FUBAR.

--
Joe Wright
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---
Sep 4 '06 #6

Lars Rune Nøstdal wrote:
On Sun, 03 Sep 2006 22:02:57 -0700, Heinrich Pumpernickel wrote:
in c/c++ programming people often call their variables foo and bar

why ?

fucked up beyond all recognition
But that doesn't explain why it's "foo" instead of "fu".

Obviously, when the WWII vets returned home, their wives
would get mad if they swore in front of their children. Hence,
my dad told us that SNAFU meant "Siuation Normal: All
Fouled Up". It was much later that I learned the original
meaning was "Fucked Up".

Not that your wife wouldn't get mad at you even if you didn't
swear. Such as the time my dad refered to our tomcat as
"the ball-bearing mouse trap".

--
Lars Rune Nøstdal
http://lars.nostdal.org/
Sep 4 '06 #7
In article <11**********************@b28g2000cwb.googlegroups .com>,
me********@aol.com <me********@aol.comwrote:
>But that doesn't explain why it's "foo" instead of "fu".
"fu" would obviously not be an English word.

-- Richard
Sep 4 '06 #8
Richard Tobin wrote:
In article <11**********************@b28g2000cwb.googlegroups .com>,
me********@aol.com <me********@aol.comwrote:
>But that doesn't explain why it's "foo" instead of "fu".

"fu" would obviously not be an English word.

-- Richard
Nonsense. Kung Fu is English isn't it? :-)

--
Joe Wright
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---
Sep 4 '06 #9
Joe Wright wrote:
Lars Rune Nøstdal wrote:
On Sun, 03 Sep 2006 22:02:57 -0700, Heinrich Pumpernickel wrote:
in c/c++ programming people often call their variables foo and bar
>
why ?
fucked up beyond all recognition
The last word is 'repair' as I learned it years ago. US Military
FUBAR.

I've seen it both was, "repair" was more common in engineering, I
suppose as engineers would be expected to attempt repairs.


Brian
Sep 5 '06 #10

Heinrich Pumpernickel wrote:
in c/c++ programming people often call their variables foo and bar

why ?
I don't know for sure, but it seems to have started on the US East
Coast.

We didnt know about it here in the MidWest, until I submitted a bug
report to DEC, in Marlborough, MA.

The commands they typed to (incorrectly) reproduce the bug were
something like:

..EDIT FOO.TXT
# I
THIS IS A LINE WITH TABS
this is a line with spaces
^L
# W
# Q

..COPY FOO.TXT BAR.TXT
..EDIT BAR.TXT
# ^C
# W
# Q
..COMPARE FOO.TXT BAR.TXT
0 differences.
..DEL FOO.TXT BAR.TXT

Sep 5 '06 #11
"Heinrich Pumpernickel" <la****@linuxmail.orgwrites:
in c/c++ programming people often call their variables foo and bar
http://en.wikipedia.org/wiki/Metasyntactic_variable

--
Best regards, _ _
.o. | Liege of Serenly Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michal "mina86" Nazarewicz (o o)
ooo +--<mina86*tlen.pl>--<jid:mina86*jabber.org>--ooO--(_)--Ooo--
Sep 8 '06 #12

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by William C. White | last post: by
2 posts views Thread by Albert Ahtenberg | last post: by
3 posts views Thread by James | last post: by
reply views Thread by Ollivier Robert | last post: by
1 post views Thread by Richard Galli | last post: by
4 posts views Thread by Albert Ahtenberg | last post: by
1 post views Thread by inderjit S Gabrie | last post: by
2 posts views Thread by Jack | last post: by
3 posts views Thread by Sandwick | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by theflame83 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.