Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

$10,000 Question ~ "The foo variable"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    $10,000 Question ~ "The foo variable"

    Why does the "foo" variable keep showing up in the X-basic explorer when you least expect it?
    Where does it come from?

    You can sometimes find it in Alpha Sports, and I've seen it in other training applications too.
    I'll be working in the X-basic explorer and all of a sudden it appears. I've never been able to find out where it is actually defined.

    This has been "bugging me" for years. As I write this, I can't find it anywhere. Go figure....
    I saw it last week running the same version of a5. And I'm sure I will see it tomorrow, providing of course I conscientiously look for it.....
    Robert T. ~ "I enjoy manipulating data... just not my data."
    It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
    RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

    #2
    Re: $10,000 Question ~ "The foo variable"

    Hi Robert,

    See threads below.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

    Comment


      #3
      Re: $10,000 Question ~ "The foo variable"

      And which threads would they be Keith?
      See our Hybrid Option here;
      https://hybridapps.example-software.com/


      Apologies to anyone I haven't managed to upset yet.
      You are held in a queue and I will get to you soon.

      Comment


        #4
        Re: $10,000 Question ~ "The foo variable"

        Ted, you gave up too easily. Keep scrolling, scrolling, scrolling.

        The message board will supply a list of threads that discuss terms in the subject line.... a handy feature that most are unaware of.

        Comment


          #5
          Re: $10,000 Question ~ "The foo variable"

          FOO
          FOO Fighters?...not.
          FOO: Conventional name in programming languages for a variable that is used once and discarded.. just to serve one purpose.. a placeholder.
          Stands for: For Once Only.
          But.. you are not restricted to FOO.. you could name your variable anything you want..just as you would your kids or dogs.
          Last edited by G Gabriel; 02-01-2012, 09:42 AM.

          Comment


            #6
            Re: $10,000 Question ~ "The foo variable"

            Originally posted by Tom Cone Jr View Post
            Ted, you gave up too easily.
            In my defense, I am suffering from logitis, caused by splitting 1� tonnes of Ash logs with a proper lumberjack axe.
            It affected my scrolling finger.
            Thanks Tom, I have never noticed or used this before.
            Good call.
            See our Hybrid Option here;
            https://hybridapps.example-software.com/


            Apologies to anyone I haven't managed to upset yet.
            You are held in a queue and I will get to you soon.

            Comment


              #7
              Re: $10,000 Question ~ "The foo variable"

              Wow, "now I know & glad I asked"... Years past, I searched and searched for the variables declaration and/or usage in the Alpha database. I never did find it anywhere in the code.

              I even went as far (years ago) to ask Selwyn about the mysterious variable. ~FYI: This was the only instance I ever contacted Alpha5 regarding a non-bug issue. (I'm sure I initially made the inquiry because I suspected the "freak appearance" of this variable that "seemingly appeared from nowhere", was somehow bug related.) Long story short: He didn't have any answers for me, and indicated it probably was of little importance. After reading this thread, I guess he was right about that!

              ~From that day on, it's always "bugged me" whenever it pops up. Oddly enough, even when I was at school for Pascal programming (I know, this shows my age) not once did I run across material making reference to using a variable named "FOO!" I was thinking that "FOO" was an acronym for "FOOBAR" or "FUBAR"


              Since it doesn't appear to "come from anywhere", I suspect it must be both internally defined, and internally used by A5 program code. ~Maybe either the "Database Documentor" which I now have, or the "CDSA code utility" could reveal it's origins......
              Last edited by SNusa; 02-01-2012, 11:59 AM.
              Robert T. ~ "I enjoy manipulating data... just not my data."
              It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
              RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

              Comment


                #8
                Re: $10,000 Question ~ "The foo variable"

                Thanks GG for finally explaining what FOO means! It was from the *FOR EACH() help that I finally understood what this variable was doing. Those programming techies just can't help themselves...from showing off!
                Last edited by MoGrace; 02-01-2012, 02:53 PM. Reason: Edited to show it was a FUNCTION
                Robin

                Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                Comment


                  #9
                  Re: $10,000 Question ~ "The foo variable"

                  Originally posted by MoGrace View Post
                  Thanks GG for finally explaining what FOO means! It was from the *FOR EACH...NEXT help that I finally understood what this variable was doing. Those programming techies just can't help themselves...from showing off!
                  MoGrace: Now that I'm curious, could you point me to that link, and elaborate on you comment? ~ Thanx in advance!
                  Robert T. ~ "I enjoy manipulating data... just not my data."
                  It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
                  RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

                  Comment


                    #10
                    Re: $10,000 Question ~ "The foo variable"

                    Saw it used in a script in here somewhere and so I looked it up in the Wiki I corrected my first post to show it was a function.
                    Robin

                    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                    Comment


                      #11
                      Re: $10,000 Question ~ "The foo variable"

                      Originally posted by Ted Giles View Post
                      And which threads would they be Keith?
                      This.... (for those who travel here again...)

                      similiarthreads.PNG
                      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.
                      "Make it as simple as possible, but not simpler."
                      Albert Einstein

                      http://www.iadn.com/images/media/iadn_member.png

                      Comment


                        #12
                        Re: $10,000 Question ~ "The foo variable"

                        Hi Robert,

                        For the most part Alpha uses a variable named "foo" in
                        • For Each foo in variablename
                        • property name for a pointer variable that is assigned a value. Before any property is assigned to a pointer, it sort of can be an undefined type of pointer (as opposed to a collection, array, variable space, type). Once you assign a property to it, it becomes a variable space. So pointer.foo will often be set to a value (typically "Dummy Value") to force it to the correct type. Then other functions that work on property pointers will work.
                        • event name of an XDialog button or a watch variable - this is poor programming practice IMHO
                        • dummy event name of an XDialog event - Probably for Listview objects that does nothing
                        • temporary variable - again poor programming practice IMHO


                        Essentially, it is just a variable name they use for a variety of purposes. In general, names should be indicative of it's purpose, unless the purpose is to obfuscate what is being done, which might be for code that you don't want anyone to understand (which includes yourself).

                        Using foo goes back to at least the earliest roots of the C language, and was typically used in the context of examples to mean "use the name of a variable of your choosing here"

                        As I have said many times, if you want to have the least collisions with variables names that Alpha uses internally, DIM every variable and use local variables except when they need a larger scope. For others, see Variable tips here.
                        Regards,

                        Ira J. Perlow
                        Computer Systems Design


                        CSDA A5 Products
                        New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
                        CSDA Barcode Functions

                        CSDA Code Utility
                        CSDA Screen Capture


                        Comment


                          #13
                          Re: $10,000 Question ~ "The foo variable"

                          Hi Ira. (I was wondering whether yo were going to chime in here. - Seriously!)

                          I'm understanding that the best usage of the "infamous foo variable" is for:
                          • When looping through an "array of elements in an object?" ie: "For Each foo in VariableName"
                            (So could I optionally use: "For Each foobar in VariableName"?)
                          • For temporarily assigning a value to a pointer when you know an actual value has not yet been assigned but still need to use it's methods.

                          • And I'm occasionally running into it because of this: XDialong event, probably for the Listview objects that does nothing



                          PS: I'm going to place an order for your code utility this evening or tomorrow. I've never requested a trial thus far, but I know your stuff is good.... ~ Your online help documents alone provided me with a great a5 foundation/starting point. (and insight as to how a5 works from the "inside-out"

                          Thank You!
                          Last edited by SNusa; 02-01-2012, 05:10 PM.
                          Robert T. ~ "I enjoy manipulating data... just not my data."
                          It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
                          RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

                          Comment


                            #14
                            Re: $10,000 Question ~ "The foo variable"

                            My two bobs worth (Australian for 20c) Foo was a iconic grafiti type symbol when I was growing up. see http://en.wikipedia.org/wiki/Foo_was_here It depicted the top part of a head with nose and fingers hanging over a fence while the eyes could just see over the it. It gave the impression someone was watching you or watching out for you. Dare I say that there is some sort od Ockerism in "C" that creeped into other programs like Alpha. Everytime I see foo in alpha he seems to be doing some sort of watching in the code. If you put a debug in teh events after him you see what he does for that particular code. I think he hasd been put in places to help with capturing the event as an example of what can be done.
                            -----------------------------------------------
                            Regards
                            Mark Pearson
                            [email protected]
                            Youtube channel
                            Website

                            Comment


                              #15
                              Re: $10,000 Question ~ "The foo variable"

                              Hi Robert,

                              Originally posted by SNusa View Post
                              I'm understanding that the best usage of the "infamous foo variable" is for:.....
                              No. Don't use foo, foobar or anything else like that. That is just a programming convention for "Fill in the Blank here"

                              Use a variable name that has meaning!. Don't reuse a variable in any single piece of code unless it is a temporary variable. By using different names, when you have a program bug, it is much easier to find.

                              And, if you happen to use the same name as an Alpha variable name in the same variable space, you or Alpha could overwrite the variable with different data, so it is a bad idea
                              Regards,

                              Ira J. Perlow
                              Computer Systems Design


                              CSDA A5 Products
                              New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
                              CSDA Barcode Functions

                              CSDA Code Utility
                              CSDA Screen Capture


                              Comment

                              Working...
                              X