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

Learning X basic

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

    Learning X basic

    Hi
    Asking a stupid question, but intelligent for a novice like me. I understand that X BAsic is the brains of alpha five, it is a language (better) like visual basic for access.
    Now is it a languaage that preexixted before alpha five and so I can learn it from books on X Basic itself?

    2. Or is ita a language designed by alpha five team and the only way to learn is through alpha five .pdf books?
    The reson i am asking this question is that I find understanding these books and Dr Peter Wayne's is a little tough for a doctor like me with no programming background. I have understood explicit and implicit variables, and dim and redim etc, but how to build expressions and syntax of functions and how to formulate commands in the XBAsic code editor goes above my head. Reading these books is like asking you people to comprehend "The New England Journal of Internal Medicine" with all tech mumbo-jumbo.
    Mr Robert T and Martin Cole are u listening?
    Cab u help me as how to go about "reading" and "writing" this language or is it a matter of more patience and time?
    pardon me if I sound stupid but I am sure there will be many novices out there who will share this view.
    AFTER ALL THE BEAUTY OF ALPHA FIVE LIES IN THE FACT THAT IT IS MEANT FOR NONPPROGRANMMERS EQUALLY AS PROGRAMMERS.

    I can now develop applications with some skill using the various genies only and I am around 1/2 a month old.

    Sincerely
    Dr Alok Modi MD

    #2
    RE: Learning X basic

    Pardon the typographical errors above
    Dr Alok Modi MD

    Comment


      #3
      RE: Learning X basic

      Go to the learning center area of the website:

      http://www.alphasoftware.com/support/tech/alpha5/learningcenter.asp

      Download the tutorials. Do the "Introduction To Action Scripting" and "Learning Xbasic" tutorials. DON'T do the "xDialog Tutorial" right away. (It's not that the tutorial is very hard, it's that you don't NEED xDialog at first, and there's a lot to it.)

      When you're done with that, download the references, and start browsing. Look at the code snippets there, preferably with an eye toward a real programming problem you wish to solve. That way, when you read something, you think to yourself, "Aha! That's how I would [do whatever I need to do]."

      "AFTER ALL THE BEAUTY OF ALPHA FIVE LIES IN THE FACT THAT IT IS MEANT FOR NONPPROGRANMMERS EQUALLY AS PROGRAMMERS."

      It may be meant for non-programmers, but it won't be long before you're programming in it. Even action scripting is programming; it's just programming with typing.

      You'll still need logic, an understanding of program flow, organization, design, an eye for detail (when things go wrong), etc.

      Comment


        #4
        RE: Learning X basic

        Hi Blake
        Tha's what i have been doing. These two .pdf books come with the CD when you buy alpha five and I have been reading it on my PC.But, pardon me , I AM Confused. I need to learn how to understand the way you guys build up expressions for functions in the expression builder and in XBasic, you know the sequence of arguments and what dots and commas etc to use, where. It HAS been given in these manuals , I know but it does not teach for various specific instances.
        2. And Where are the "references" that you mentioned?

        3. Primarily is X Basic a language that has existed before alpha five? and so can I find books on X Basic which I could master and then go Alpha five or has it been written by alpha five guys?

        Regards
        Dr ALok Modi MD

        Comment


          #5
          RE: Learning X basic

          Just as you use a conglomeration of symptoms to make a diagnosis, it is possible to use a group of functions to build an expression.

          Consider the following (some transformations are trivial, for demonstration purposes). Suppose we want to convert a number to character digits, forcing its values to line up on the left (not the usual right for digits) and use zeroes to fill the left "empty" places.

          number = 1999 'str() function yields
          ? str(number,12,0)
          = " 1999" - used 12,0, to have wide character value, 0 decimals

          ? alltrim(str(number,12,0))'alltrim() removes spaces
          = "1999"

          ? padl(alltrim(str(number,12,0)),12,"0") 'padl() fills to 12 wide with "0"
          = "000000001999"

          Now for fun fill with "-" not "0"

          ? padl(alltrim(str(number,12,0)),12,"-")
          = "--------1999"

          ? remspecial(padl(alltrim(str(number,12,0)),12,"-"))'nice function to remove non-digit characters
          = "1999"


          ? stritran(padl(alltrim(str(number,12,0)),12,"-"),"--","**",2,1) 'change two of those ugly "-" characters to "*" in a certain place in the sequence
          = "--**----1999"


          Now take a break to catch your breath, wasn't that fun.

          "And Where are the "references" that you mentioned?" - If you have downloaded the AlphaFiveHelp.chm, look at the index, the bottom entry (below user guide) is "References".
          There can be only one.

          Comment


            #6
            RE: Learning X basic

            OK, let's go backwards.

            3. No, Xbasic is a sorta Alpha invention. It's a dialect of dBase but I don't think there are enough similarities to be of much help.

            2. The references I refer to are the reference manuals, available in the same approximate place as the tutorials. Once you're reasonably comfortable with the language, you can see all the stuff you can do with xBasic lined up in order or by category, etc.

            1. Stan gave you a good example of how expressions get built, but keep in mind, you don't have to build mega-expressions. You could do what he does in a single expresion step-by-step.

            Dim Number as N
            Dim Str as C
            number = 1999 'str() function yields
            C = str(number,12,0)
            C = alltrim(C)
            C = padl(C, 12, "0")

            This can sometimes be clearer.

            Comment


              #7
              RE: Learning X basic

              Hi Alok Modi !

              My favourite doctor.
              I guess you should be taking another route just for now.
              I would advise that you would first learn how to work with Alpha's Action Scripting.
              Once you get some experience with that, you can more easely take the step to pure xbasic code.
              You can change action scripts into xbasic code and study it with more result if you already understand the action scripts.It has worked for me.

              Once you have gained more knowledge about action scripting, you will also find, that the Alpha documentation combined with example databases is quite sufficient, not to say overwhelming.

              And for everything you should not find there, guess what, we have a forum !

              Kind regards,

              Marcel

              Comment


                #8
                RE: Learning X basic

                Hi everybody, thanks Blake and Stan.
                First of all I think I should pat myself for being a 1 mo old child and writing an application commercially for a radiological clinic (without XBasic of course), so there.

                But what I asked primarily on this forum is that I am getting confused by the "what I feel does'nt make sense" sequence of commas, semicolons etc in exprssions and XBAsic code. Where do you put what command and how do you decide which comma to go where, you know?
                I have understood what function to use where, that's not difficult, it's the knowledge of putting the right no of commas and colons and where to put what I don't understand, and non of the books or references you mention are helpful on this. I have even long back downloaded the latest .CHM file including alpha five V6 help. That only confuses me more as to the syntax and the yellow bulb (Box literally)that lights up in the expression builder when you type the syntax is even more confusing.

                Can you light a bulb there for me? please!!!

                And Marcel, My favorite ------- what should I say ?
                I can only say that I hope I could meet you some day??????
                IN PERSON?? A lot of scores to settle (over a nice doughnut and icecream I hope? ) I used to be in Minneapolis 8 yrs back for around 2 yrs and I swear I have yet to taste those garlic dominos pizzas( I am a pure veg) like they made back therenear my apartments in Franklin Street,Indian Dominoes are nowhere/ I do miss u guys and your country quite often!!!!

                Dr Alok Modi MD

                Comment


                  #9
                  RE: Learning X basic

                  Are you really having trouble with commas and semi-colons or is it more a problem with periods and colons?

                  The only use I can think of for commas is to separate arguments in functions. And, right now, all I can think of for the semi-colon is to end a line in an Xdialog script.

                  What used to throw me the most was the use of colons and periods when addressing objects on forms. Although it's not necessarily a hard and fast rule, I generally think of the colons as separating things I can see and the period comes before actions, properties, etc. that can't be seen.

                  For example:
                  In EDIT_COURSE_GRADE:tabbed1.code.CanTabChange
                  I can see the form called EDIT_COURSE_GRADE and I can see an object on that form called "tabbed1" but I can't see the property called "code" and I can't see the event/action called "CanTabChange". Yes, there is (or could be) a script in the CanTabChange event but that is not the same as the property called "code".

                  In FormName:ButtonName.push()
                  I can see a form called FormName and a button called ButtonName but I can't see the action called "push". Yes, I should be able to see the results of the "push" action - assuming my script is running correctly - but I can't actually see anything on the form called "push".

                  FWIW, I still have problems sometimes and, when I do, I use the Xbasic Explorer to check my syntax/"punctuation".

                  Hope this helps a bit.

                  Cal Locklin
                  www.aimsdc.net

                  Comment


                    #10
                    RE: Learning X basic

                    NO my problem is more global. I don't know where to put commas, stops, semicolons, etc. How to syntax? I wonder if there is somewhere that can lay down in easy language the way to write in XBasic. The rules are written , but these books are not very clear everywhere. and Dr Wayne's book is for v4.5, which is confusing, working in v5.0



                    DR Alok Modi MD

                    Comment


                      #11
                      RE: Learning X basic

                      Alok,

                      I have even long back downloaded the latest .CHM file including alpha five V6 help. That only confuses me more ...

                      I don't know where to put commas, stops, semicolons, etc. How to syntax?

                      It seems that you need to pay closer attention to the syntax layouts provided in the CHM help documents. If in some examples provided elsewhere (e.g. Dr. Wayne's books) you went to the CHM pages for the functions used, you would get a better feel on how to use the CHM.

                      Certain symbols used within the syntax have meanings which may not be explained anywhere and which may be leading to your "confusion". For instance, a parameter enclosed with square brackets ([]) is optional.

                      Again, once you get the hang of using the CHM, you can (a) search for a function or method for your needs based on key words, (b) observe the syntax, (c) see what parameters it takes and (d) observe what is returned. Thanks to Ed, this process makes XBasic rather straightforward. I hope I haven't just cluttered this thread with more confusion. Best of luck in using Alpha5.

                      Steve

                      Comment


                        #12
                        RE: Learning X basic

                        Don't get hung up on punctuation. The best way I have found to learn anything (I am an instructor by trade) is to start with very small pieces and build very small structures. Where to drive the nails (place punctuation) will be become obvious as you go along.

                        For example, I have seen some amazing complex expressions shown on the forum. I have no idea how they work and can't follow many of them. However, I use complex expressions all of the time. The difference? I build one small piece, then another, and so on and combine them step by step until I get the bigger structure. When I am done, I know each piece. Here is a simple example. I want to convert a number to a character and add some zeros to the front.

                        First, I convert the number to a generic character and save it in a variable

                        org_number (numeric) = 12253.00

                        new_num = str(org_number,12,0)

                        Now about the commas. A comma separates an argument or entry into a function. The function str() has a number of arguments, but only one is mandatory - the actual number value. The second agrument (optional) is a number for the length to return. The third argument is the number of decimal places. So in text, the function becomes

                        number,length,decimals

                        The commas just separate each parameter. Now back to the expression. The value in new_number is now

                        " 12253"

                        I want to trim the spaces, so I use alltrim()

                        new_num = alltrim(new_num)

                        which is "12253". Now I want to pad leading zeros and use padl()

                        new_num = padl(new_num,10,"0")

                        Note that all character values must be in quotes to be treated as text. The result is

                        "0000012253"

                        If I combine the last two expressions and replace the variable new_num with the expression that created it, I get

                        new_num = padl(alltrim(new_num),10,0)

                        If I replace the value of new_num in the right side of the equation with the expression that created that, I get

                        new_num = padl(alltrim(str(org_number,12,0)),10,0)

                        This has lots of punctuation, but the source of each piece is easier to see. Punctuation in other areas is similar. Another way to get a better grip on what is going on is to let the Action Scripting or other genie create what you want, and then convert it to xbasic. Look at each command on each line by itself and break it down to the smallest element. That will give you a good idea.

                        As far as I know there is no "dictionary" of punctuation. There are a few rules in some areas, like quotation marks set off text to be treated as text instead of a variable name, or commas are placed between arguments in expressions, but that is about it. There is some discussion of periods and colons in object addressing help, but I usually use the object explorer to get the syntax right. I don't try to remember the "rules"

                        Reading books and help files on complex projects isn't much help until you can use one function by itself, or one simple expression like name = "joe" Look at the little stuff and you we see how to put the little stuff together to be big stuff.

                        By the way, even books an A5V4 are useful since xbasic, functions, and expressions have just been expanded since then, not changed. And don't worry if you don't understand it all. No one does. Well, maybe Selwyn, but he wrote much of it.

                        Jerry

                        Comment


                          #13
                          RE: Learning X basic

                          When viewing the xbasic created by action scripting, keep in mind that there is often a lot of "extra stuff" in there. The automated routines (action scripting) have to cover many possibilities/options and might be used in various situations and with different scripts preceding or following them. Because of this, it is often necessary to add checks/features that might not be necessary to do the basic job but are required to cover what I call the "just in case" situations.

                          As an example, some scripts will check to be sure they are running from a form but that isn't necessary if I know my script will always run from a form. (or I'm aware that I will get an error message if I forget and run it from the code editor directly.)

                          I've seen situations where 10-15 lines of xbasic from action scripting might be reduced to 1-2 lines for a specific situation. The reason it can be reduced is that I can evaluate my specific situation and remove the extraneous checks/features that aren't needed to perform my specific task.

                          Having said all that, I still agree that using the xbasic generated by action scripting or other automated methods is a good way to learn.

                          Cal Locklin
                          www.aimsdc.net

                          Comment


                            #14
                            RE: Learning X basic

                            Wow
                            Thanks guys!!!
                            Give me time! Now I want 6 months and I am sure I'll pick up X Basic. But the way I see it XBasic is an ongoing process. You know VB may be tough , but books explain the entire language of it, like at the end of the function, end if, etc.

                            Selwynn should have written a book for all of us as to how he has written the code and how he went about it. I am sure it would help all of us.

                            I'll keep in touch and continue to learn.

                            Thanks Jerry and Cal for your time.

                            By the way, Marcel !!!
                            where are you ?
                            What happened to the icecream?

                            Warm Regards
                            Dr Alok Modi MD

                            Comment


                              #15
                              RE: Learning X basic

                              With programs that use VB, you can't do much without knowing how it works. However, you don't really need xbasic to do a lot in A5. One language is required and one is optional. There is also a big difference in the size of the user base. As Dr Wayne and others will attest, the market for such books would be fairly low.

                              The help files have nearly all of the information you need. The only limitaion is the size of the Help, which is huge and sometimes makes finding what you need an interesting task. But the answers are probably there.

                              Learning xbasic and xdialog is like learning any language. First you learn some words. Then some basic grammer until you can make a sentence. Finally, we learn paragraph structures, and how to structure a chapter. Most of us couldn't write a good novel in our native language, so it is unlikely we could do a great job in the equivalent in a programming language. But you have to start somewhere.

                              Jerry

                              Comment

                              Working...
                              X