What is foo?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • satyam123
    New Member
    • Jul 2007
    • 2

    What is foo?

    can any body explain me about 'foo'.
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    It is just a common name used in examples where an identifier is required (normally for a function) but there is no context in which to give the identifier a meaningful name.

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      Read all about foo and bar.

      kind regards,

      Jos

      Comment

      • archonmagnus
        New Member
        • Jun 2007
        • 113

        #4
        Sure. It is a metasyntactic variable. Just like bar, xyzzy, fee, fie, foe, fum, and a host of other arbitrary names that have no connotation to what type of value is stored in the variable's memory location.

        For more info, see the Wikipedia article on metasyntactic variables.
        Last edited by archonmagnus; Jul 21 '07, 06:42 AM. Reason: Looks like Jos already gave a valid reference. Sorry.

        Comment

        • JosAH
          Recognized Expert MVP
          • Mar 2007
          • 11453

          #5
          Originally posted by archonmagnus
          Sure. It is a metasyntactic variable. Just like bar, xyzzy, fee, fie, foe, fum, and a host of other arbitrary names that have no connotation to what type of value is stored in the variable's memory location.

          For more info, see the Wikipedia article on metasyntactic variables.
          Minor nitpick: xyzzy is not a metasyntactic variable; it's the secret password.

          kind regards,

          Jos ;-)

          Comment

          • anubhavit
            New Member
            • Jul 2007
            • 5

            #6
            Originally posted by JosAH
            Minor nitpick: xyzzy is not a metasyntactic variable; it's the secret password.

            kind regards,

            Jos ;-)
            Sorry for the joke here, but I agree with JosaH , xyzzy is a cheat code in game ROADRASH.

            Comment

            • JosAH
              Recognized Expert MVP
              • Mar 2007
              • 11453

              #7
              Originally posted by anubhavit
              Sorry for the joke here, but I agree with JosaH , xyzzy is a cheat code in game ROADRASH.
              I don't want to spoil the fun, by xyzzy was a secret password decades ago already ;-)

              kind regards,

              Jos

              Comment

              • archonmagnus
                New Member
                • Jun 2007
                • 113

                #8
                Originally posted by JosAH
                Minor nitpick: xyzzy is not a metasyntactic variable; it's the secret password.

                kind regards,

                Jos ;-)
                I know, but it has taken on metasyntactic attributes in more recent history.

                Oh, and anubhavit, it was a secret in "Colossal Cave Adventure" first.

                Comment

                • JosAH
                  Recognized Expert MVP
                  • Mar 2007
                  • 11453

                  #9
                  Originally posted by archonmagnus
                  I know, but it has taken on metasyntactic attributes in more recent history.

                  Oh, and anubhavit, it was a secret in "Colossal Cave Adventure" first.
                  I knew that game by the simple name 'Adventure'. We could play it simultaneously
                  with four people maximum on our PDP11/60 and then the machine went down ;-)

                  kind regards,

                  Jos

                  Comment

                  Working...