A definition of FOOBAR? This thread scrolled by on CompuServe last week. ---------------------------------------------------------------------------- Fm: Benjamin T. Bajorek 71610,637 Could someone please tell me the significance of foobar? I've seen it in so many example program fragments over the years and I'm wondering why it's used and where it came from. Fm: Philippe Ranger (TeamB) 71531,1350 Foobar is of course pig Yiddish (ganz streif!) for barf. It's usually found as two names, foo and bar. I believe it originates in Lisp, so those would perforce be function names, used in examples. But it leached over into C talk (noch streif for Neil). Rumor I heard attributed the original example tags to a teacher at MIT, possibly Guy Steele. Fm: Neil J. Rubenking(TeamB) 72241,50 Start with snafu -- Situation Normal, All F***ed Up. Army slang, I think. When things get worse, they're fubar -- F***ed Up Beyond All Recognition. Somehow that translates to foobar, and you'll find that "foo" and "bar" and "foobar" are the most popular variable names that are more than one character. Fm: jay terry 71571,1661 That was also my understanding of where the term came from, basically a mangled version of FUBAR. Years ago in our work group we came up with the idea of assigning a nickname to everybody after they had been in the group long enough for us to come up with something appropriate. Eventually we got a new boss and he was naturally curious as to what his handle would become. After our deliberations, we settled on FUBAR for his nickname. Fortunately, he had no idea of its true meaning so we told him it stood for Frequently Unpleasant But Always Responsive. I think he still believes it to this day, and is even proud of it. Fm: Philippe Ranger (TeamB) 71531,1350 Jay, I'll excuse your support for Neil, on the grounds of your past services in spreading confusion. Fm: jay terry 71571,1661 That's very kind of you (I think?). Even *I* can't be confusing ALL the time. Fm: Benjamin T. Bajorek 71610,637 I'm sorry I asked. I figured I'd hear something like: ... the foo is hexadecimal, really F00. Bar is a radix 32 number, of course. Reportedly first used by Augusta Ada Byron when programming one of Babbage's machines... Since it's based on military slang maybe Grace Hopper's involved? Fm: John M. Dlugosz 74066,3717 .used by Ada Augusta when programming Babbage's machines... F00 is hex... I disagree with your assessment of BAR being radix 32. Rather, it is an instruction, "Branch and Resume" which is sort of like the modern longjump() or a TSS jump on the '386. It restores all the registers from the settings stored at the specified address. It is also used to reset the machine, by restoring to the power on state which is stored at beginning of ROM at the end of the address space. In prefix notation, this becomes F00 BAR at the end of a program. Fm: Neil J. Rubenking(TeamB) 72241,50 You know so much, I bet you know why the number 12648430 is treasured by all programmers! Fm: Scott Bussinger (TeamB) 72247,2671 Me thinks you need a cup right now! Fm: Neil J. Rubenking(TeamB) 72241,50 You win! SLUUUUUURP! Fm: Michael Day (TeamB) 73577,2225 Only if it is unleaded! Fm: John M. Dlugosz 74066,3717 sorry, that one does not ring a bell. Fm: Neil J. Rubenking(TeamB) 72241,50 In hex, it's C0FFEE! ----------------------------------------------------------------------------- internet : donald@cup.portal.com 72517.3103@compuserve.com FUBAR certainly predates the VAX as does FOOBAR... The TMRC (Tech Model Railroad Club at MIT) train controller used more rotary telephone stepper switches than most telephone company local offices at that time. Anyway there was a display on the wall which showed the most recently dialed instruction (one letter, two digit address). When the system crashed (FUBARed) it displayed F00. I don't know if this was accidental or intentional, but due to the huge overlap between computer hackers and the TMRC, foo quickly became THE metavariable. (And bar the second metavariable.) -- Robert I. Eachus with STANDARD_DISCLAIMER; use STANDARD_DISCLAIMER; function MESSAGE (TEXT: in CLEVER_IDEAS) return BETTER_IDEAS is... FUBAR: It also stands for "Failed Uni-Bus Address Register" Page 188 of the VAX 11/780 Hardware Handbook (1978-1979 edition): Failed UNIBUS Address Registers (FUBAR) The FUBAR contains the upper 16 bits of the UNIBUS address translated from an SBI address during a previous software-initiated data transfer. The occurrence of either of two errors indicated in the status register will lock the FUBAR: UNIBUS Select Time Out (UBSTO) and UNIBUS Slave Sync Time Out (UBSSYNTO). When the error bit is cleared, the register will be unlocked. The FUBAR is a read-only register. Attempting to write to the register will result in an error confirmation. No signals or conditions will clear the register. Figure 9-15 shows the bit configuration of the FUBAR. The contents of the FUBAR are listed below: 31 16 15 0 +----------------+----------------+ | UNUSED | | +----------------+----------------+ \______________/ FAILED UNIBUS TO SBI ADDRESS UNIBUS ADDRESS BITS <17:02> Figure 9-15 Failed UNIBUS Address Register Bit Configuration Bits <31:16> Reserved and Zero Bits <15:00> Failed UNIBUS to SBI Address These bits correspond to UNIBUBS Address bits <17:02> The above is copyright 1978 by Digital Equipment Corporation, of which this transcription is a violation. In article <47411@apple.Apple.COM> aek@Apple.COM (Al Kossow) writes: >I was watching "Daffy Doc", one of the early Daffy Duck cartoons >(1938). In one scene he holds up a sign that says "Silence is foo". In the newspaper comic strip of that era, "Barney Google" (ancestor of today's "Snuffy Smith" - in fact, Barney is still mentioned occasionally in Snuffy's cartoon), the word "foo" often came up in the background as a running joke. For instance, you might see on the wall a little plaque that says "HOME SWEET FOO" or a sign: "THE FOO THAT BROKE THE CAMEL'S BACK." Foo never appeared in the main plot (at least in the small sample of Google strips I've seen), but often in the background. It could be that Bugs' sign was a reference to this in-joke.