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

Dot variables

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

    Dot variables

    Hi
    Can someone explain dot variables. Are these created on the fly and you just add properties at will. Can you dim them or assign pointers to them. I have been programming in vb6 and I can not get my brain to grasp these type of variables. In the manual it looks like you create them on the fly and you add properties to them on the fly. Any help in understanding them would be helpful.

    Thanks
    John Marrone

    P.S. I hopr within a few days I will have less questions to bother you folks with. I am really thankful for the help all of you have given so far.

    #2
    RE: Dot variables

    Take a look here first. Then you might want to post more specific questions.
    There can be only one.

    Comment


      #3
      RE: Dot variables

      Thanks Stan, that ws a very good article. What it didn't cover was if you can create one on the fly. But I have in the Interactive window so I would say you can.

      Also I read in an article that Alpha 5 does not have multi deminsional arrays. Will I be able to do this:

      Type RaceRecord
      Date as c
      Race as c
      Track as c
      End Type

      Dim RC(100) as RaceRecord

      And then use it like this:

      tbl.Date = RC(1).Date
      tbl.Race = RC(1).Race
      tbl.Track = RC(1).Track

      and so forth.

      If I can this would solve all my problems with not having multi deminsional arrays.

      Comment


        #4
        RE: Dot variables

        I read the syntax as

        Dim RC[100] as {RaceRecord}

        Then I'm not sure whether you mean

        tbl.Date = RC(1).Date
        tbl.Race = RC(1).Race
        tbl.Track = RC(1).Track
        this fills table fields with the array values, assuming you have populated the array

        or

        RC(1).Date = tbl.Date
        RC(1).Race = tbl.Race
        RC(1).Track =tbl.Track
        this assigns record values to the array elements.

        Either set of statements could be valid bsed on context and other statements, such as putting the table in enter or change mode before "tbl.Date = RC(1).Date".
        There can be only one.

        Comment


          #5
          RE: Dot variables

          I think your answer was yes. Sorry to confuse you I see now that A5 uses "[]" for arrays. But I create a type variable and I can then create variables of that type like this:

          Dim MyVar[100] as RaceRecord ??

          Does RaceRecord have to be enclosed in "{}" and is this the rule anytime you dim a variable with a User Define Ttype, so I should do it like this:

          Dim MyVar[100] as {RaceRecord}

          I quess what I am asking is if the curly brackets are required. If I can do what I need to do like this it is even better than having multi deminsional arrays.

          John

          Comment


            #6
            RE: Dot variables

            I think my answer was yes, as well.

            I'm trying to lend a hand here, but probably not giving you what you want. I've never used the features you are inquiring about, just somewhat familiar with the docs. The following is cut and paste from the documentation

            ' Declaring Variables Using a Structure
            ' Define the structure.
            type customer
            name as C
            company as C
            phone as C
            age as N
            end type

            dim custs[10] as {customer}
            ? properties_enum(custs[1] )

            = "NAME
            COMPANY
            PHONE
            AGE
            "

            So it seems the curlies are required.
            There can be only one.

            Comment


              #7
              RE: Dot variables

              Hello John,

              Check out the Type.... End Type in the documentation. Basically you are creating a pointer, which can have many subelements (variables) of different type. Really just a cleaner way to define dot variables. Also check out collections.

              As to multi-dimensional arrays, unless our definitions are different, Alpha certainly has this capability, ie: the above Type...End Type command.

              Good luck,

              Jim

              Comment


                #8
                RE: Dot variables

                You can also skip the array syntax entirely, if you wish. It's somewhat more cumbersome to evaluate, but somewhat more flexible as far as range. And since there's little serious type-checking in A5 and you're using all character fields, you could just as well do it this way:

                A.1.Race = "5th"
                A.1.Date = today
                A.1.Track = "Santa Anita"

                You can use a variable to index this pseudo-array:

                eval("A."+N+".Race") = "5th"
                eval("A."+N+".Date") = today

                If you do this sort of thing a lot, you could make a function:

                ASet("A", N, "Race", "5th")

                or even:

                ASet(N, "Race", "5th")

                if you were working with a single pointer variable or one that you changed infrequently, and so could use a global.

                I find having to set array limits to fixed values to be a bit of a pain, so I usually opt for using pointer variables.

                Comment

                Working...
                X