Foobar - Usage in Code

Usage in Code

The terms are very often used in programming examples, much like the Hello World program is commonly used as an introduction. For example, foo and bar might be used to illustrate a simple string concatenation:

/* C code */ #include int main { char *foo = "Hello"; char *bar = "World!"; printf("%s %s\n", foo, bar); return 0; } /* PHP code */ $foo = 'Hello'; $bar = array($foo, ' ', 'world', '!'); echo implode('', $bar);

Additional examples of the use of foo and bar in code are given in the entry on metasyntactic variables.

Read more about this topic:  Foobar

Famous quotes containing the words usage and/or code:

    Girls who put out are tramps. Girls who don’t are ladies. This is, however, a rather archaic usage of the word. Should one of you boys happen upon a girl who doesn’t put out, do not jump to the conclusion that you have found a lady. What you have probably found is a lesbian.
    Fran Lebowitz (b. 1951)

    Faultless honesty is a sine qua non of business life. Not alone the honesty according to the moral code and the Bible. When I speak of honesty I refer to the small, hidden, evasive meannesses of our natures. I speak of the honesty of ourselves to ourselves.
    Alice Foote MacDougall (1867–1945)