Mail from ILUG-BOM list (Non-Digest Mode)
_______________________________________________

On Sep 15, 2000 at 12:36, amarg wrote:

>Can someone let me know, what do the words foo, bar, and 
>foobar stand for, or rather signify.

It's what we call a metasyntactic variable. See
<http://www.tuxedo.org/~esr/jargon/>.

When you want to refer to this, that, and the other, hackers say foo, bar
and baz. So suppose you have a databse called foo with a table bar, you
get to it in MySQL with the commands:
        use foo;
        select * from bar;

That's how it's used. meta, syntactic, variable. foo could be any databse
in real use, bar could be any table. Or, say you have a file called
foo.png which you want to convert to foo.jpg... see?

The list goes: foo, bar, baz, quux, quuux, etc. foobar is another way of
saying foo if you only have one variable. Like Tom, Dick, and Harry.

A real variable in a real program might be called foo if it's scope is
very short; I have often used this:
        $foo=$q->param('bar');
        $sql.=dbQuote($foo);

That 'bar' in the 1st line is another example of a metasyntactic
usage. Here I was showing you a piece of code to illustrate something
else, so the actual param I use didn't matter, so I used bar.

>I know that their origin is in the Usenets, but _NO_ book

No.

-- 
Satya. <URL:http://satya.virtualave.net/>
US-bound grad students! For pre-apps, see <URL:http://quickapps.cjb.net/>
Did you know Linux stands for Linux Is Not UniX ?


_______________________________________________
Website: http://www.ilug-bom.org.in/
Linuxers mailing list
[EMAIL PROTECTED]
http://ilug-bom.org.in/mailman/listinfo/linuxers
CHAT: irc.ilug-bom.org.in

Reply via email to