Alpha Video Training
Results 1 to 6 of 6

Thread: "foo" - Please explain

  1. #1
    Member
    Real Name
    Ernie Storms
    Join Date
    Mar 2008
    Location
    Wimberley, Texas
    Posts
    566

    Default "foo" - Please explain

    I've seen this term used and seems I've seen it explained somewhere in the Help files, but cannot find it now. Is it just an arbitrary term, or does it have some further uses? I didn't see it in the reserved words list.
    Just curious. Thanks.
    Ernie

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: "foo" - Please explain

    Often used in examples to indicate a representative entry of a list. Much like the "i" in

    for i = 1 to 100

    Check the documnetation of *FOR_EACH().

    (and note the search tab of the webhelp)

  3. #3
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,628

    Default Re: "foo" - Please explain

    google is our friend..

    foo1

    foo2
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  4. #4
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,204

    Default Re: "foo" - Please explain

    Common programming jargon, origin unknown, used in almost all development languages when you refer to "something" that could be "anything".

    Same thing with "Hello World". Used also in most programing languages as the message of choice.

  5. #5
    "Certified" Alphaholic
    Real Name
    Cal Locklin
    Join Date
    Mar 2000
    Location
    S.E. Michigan
    Posts
    5,763

    Default Re: "foo" - Please explain

    Quote Originally Posted by Stan Mathews View Post
    Often used in examples to indicate a representative entry of a list. Much like the "i" in

    for i = 1 to 100
    ...
    <pet peeve rant>
    People who use "i" as a variable.

    Someone sent me an app last week which used this variable in a loop just as shown and, as part of my debugging/research, I had to search out each place that the variable was used. Can you imagine how many times the letter "i" is found in one 200 line script!!! What a pain and waste of time. If you must use just one letter, pick something less likely to be used elsewhere - w, x, y, or z would be better - anything is better than a common vowel. Or, even better yet, if you don't want to use a descriptive name, use at least two letters - "qi" isn't likely to get repeated anywhere else. I usually use qx then qy for any loop embedded within a qx loop. (A programming instructor a few decades ago gave us the idea of using the letter "q" to make something unique. It works very well - especially if it's not "qu".)

    For those who never thought about this before and/or the vast majority out there now who probably never programmed in the 60's, the use of "i" in i = 1 to 100 started in the days when long names were not allowed for variables and a line of code would often look like this:
    J = K * 3.1415 + G - U1 + P^3 / U2
    (Yes, these programs were a real pain in the whatever to read/debug.)
    In this case, "I" typically stood for "increment" and (a) there weren't any words or long variable names in the code to use the letter "i" in and (b) there probably weren't any reasonable methods to do text searches other than using the Mark II Eyeball - none that I recall anyway.
    </pet peeve rant>

  6. #6
    Member
    Real Name
    Ernie Storms
    Join Date
    Mar 2008
    Location
    Wimberley, Texas
    Posts
    566

    Default Re: "foo" - Please explain

    Thanks for ALL the info guys. Yes I did use the Search in the Help and read thru a lot of it, but nothing really explained it like you've done here. It just assumed I knew what it was.
    Thanks again.
    Ernie

Similar Threads

  1. form.view("fName","","","center","center")
    By reynolditpi in forum Alpha Five Version 9 - Desktop Applications
    Replies: 5
    Last Post: 07-15-2008, 12:37 AM
  2. To "zoom to record" or to "open form" using action scripting, that is the question.
    By georgefurnel in forum Alpha Five Version 9 - Desktop Applications
    Replies: 4
    Last Post: 06-18-2008, 07:32 PM
  3. "Add" and "Save" buttons don't stay on "Self" page
    By Scholin in forum Application Server Version 8
    Replies: 2
    Last Post: 02-05-2008, 08:50 AM
  4. Field rule lookup - select "A"; enter "X"
    By CALocklin in forum Alpha Five Version 8
    Replies: 5
    Last Post: 01-24-2008, 04:45 PM
  5. The power of a "Dialog" and the ease of use of a "Grid" component.
    By Fulltimer in forum Application Server Version 8
    Replies: 7
    Last Post: 01-18-2008, 02:08 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •