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

ALPHAB. ORDER= �, e, �, etc.

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

    #16
    RE: ALPHAB. ORDER= �, e, �, etc.

    Hi Ira,

    That's an interesting approach. I hadn't thought of using the AT function. I think I will do some speed comparisons between the various approachs and report back.

    Regarding the asc function, I, too, was surprised. It sort of blocked me off from one approach I might have taken. On the bright side, it was probably a lousy approach.

    At any rate, the interactive window gives the following:

    ?asc("�")
    = -23.000000

    ?asc("e")
    = 101.000000

    Go figure.

    As usual, your response has opened my eyes to new ways to solve a problem. For this I thank you.

    You will definitely see me in the audience of any workshop on functions you offer in Boston.

    Bill
    Bill Hanigsberg

    Comment


      #17
      RE: ALPHAB. ORDER= �, e, �, etc.

      Hello again,

      For those (probably few) who have not tuned out of this arcane forum devoted to accents, here is what I wrote last night following Ira's suggestion that syntax using $ would run faster than my original which used multiple .or. condition.

      function no_accents as C(input_string as C)
      ' Replaces accented characters with unaccented equivalents for ordering

      tmpstr = ""
      for i = 1 to len(input_string)
      vChar = substr(input_string,i,1)
      select
      case between(vChar,"A","Z")
      vChar = vChar
      case vChar $ "��������"
      vChar = "e"
      case vChar $ "��"
      vChar = "c"
      case vChar $ "�����������"
      vChar = "a"
      Case vChar $ "��������"
      vChar = "u"
      Case vChar $ "����������"
      vChar = "o"
      Case vChar $ "��������"
      vChar = "i"
      Case vChar $ "���"
      vChar = "y"
      case else
      vChar = vChar
      end select

      tmpstr = tmpstr+vChar
      next

      no_accents = tmpstr

      end function

      It will be observed that I included more accented characters than the earlier version, or than Ira did in is later contribution.

      Using a list of 400 names it ran at about the same speed as Ira's. It would be interesting to know the speed effect of lengthening the list of accented characters using Ira's approach.

      The fact that the function is rather slow reinforces the idea that--always depending on circumstances--it may be better to use the function in a calculated field rule (or elsewhere) to fill a field to index. That way, the function wouldn't have to evaluate each record whenever indexes were rebuilt.

      Trivial as this may seem, the teachers in my language departments have been bugging me for a year or two about my application misordering their names many of which include accented characters. I wonder if they notice that they now will display correctly.

      If you ever visit Montreal, treat yourself to a look at the telephone directory. Alphabetical order in French is, as they say, piquant. A favorite of mine is the place where I buy jogging shoes called La Boutique Endurance. It is listed under "L" along with half the other businesses in the city.

      Bill
      Bill Hanigsberg

      Comment


        #18
        RE: ALPHAB. ORDER= �, e, �, etc.

        Bill,

        The asc() function is returning a negative number for ascii values above 128. I haven't checked the mapping, but you most likely either add 256 to the value, subtract it from 256 or take the absolute of the negative values and add 128 or subtract it from 256.

        Also, I would think placing all the characters into newvalues and old values would still be faster than all of the case statements (particularly the ones at the end). A5V5 has profiling (timing measurements) built into parts of it, so it will be useful for evaluating methodologies.

        Finally, is it typical to convert umlat etc type characters to the normal alphabetic value for sorting, or are they considered a subsort of the letter, i.e. sorts would be something like this kind of order E�����e��� ?

        Regards,

        Ira J. Perlow
        Computer Systems Design & Associates
        [email protected]
        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


          #19
          RE: ALPHAB. ORDER= �, e, �, etc.

          Hi Ira,

          I also prefer your methodology if only because all those case statements I used are ugly.

          You wrote, "Finally, is it typical to convert umlat etc type characters to the normal alphabetic value for sorting, or are they considered a subsort of the letter...."

          I actually investigated this, easy enough for me as all I had to do is ask a member of the French department three doors down the hall. I was surprised to learn that they just want all the e's together regardless of the accents (or no accent). I was a bit surprised but that was the answer.

          I have no idea what the convention may be in other languages or other French-speaking societies.

          I had to add the upper case accented characters to your function, expecially "�". They aren't always used, but when they're there they really rearrange things.

          Take care,
          Bill
          Bill Hanigsberg

          Comment


            #20
            RE: ALPHAB. ORDER= �, e, �, etc.

            Bill,
            Since you like playing around with stuff, here's one for you. Assuming that A5's random number generator will return the same result if given the same "seed" (like Quick Basic does), you can create your own encryption function
            using something like this (but, of course, some stuff is going to be missing here...) :
            dim array(255)
            get user's seed / password
            generate random number sequence (255 spaces) (call it x)
            loop through 255 (call it n)
            get the n position in x
            newchar = add x to n
            if newchar > 255 then newchar = 1
            put newchar in array(1, n)
            end loop

            Now you can use ASC() and CHR() to get/set values in a string for encryption/decryption. You could just use 1 random number and "shift" the ASCII values up or down by that amount, but those kinds of encryption are pretty easy to break with a little effort (letter frequency, 1 and 2 character words, etc). You could even use a multiple encryption with the random number indicating which random result to use, have that result indicate which new formula to use which creates additional random seuqnces, etc. Maybe by nesting random sequences you would encrypt/decrypt a string of chars like : the first 3 chars use random sequence 8 and the 4th uses random sequence 9, the next 2 use seq 3, the next 5 use seq 9, etc. You get the idea.

            Go crazy.

            Comment


              #21
              RE: ALPHAB. ORDER= �, e, �, etc.

              Bill,
              Just looking in the spanish dictionary the accent doesn't affect the order of things, ie centrar, c�ntrico, centrifugadora.

              Not being a linguistic expert but knowing that the accent is only to help pronunciation it is not surprising that your french colleagues don't care about sorting by accent order.

              However, the original question may have other considerations.

              Bon weekend.

              Steve

              Comment


                #22
                RE: ALPHAB. ORDER= �, e, �, etc.

                Steve,

                Merci pour l'information.

                A bient�t,

                Bill
                Bill Hanigsberg

                Comment


                  #23
                  RE: ALPHAB. ORDER= �, e, �, etc.

                  Jim,

                  Thanks for that. I printed it out and began to obsess actively. My wife noticed this and commented that I was already crazy enough without extra help from you.

                  Coming to Boston?

                  Bill
                  Bill Hanigsberg

                  Comment


                    #24
                    RE: ALPHAB. ORDER= �, e, �, etc.

                    With the proper level of obsessing you'll discover that you can expand the process (multi-dimensioanl arrays, etc) and even use it to do things other than encryption/decryption, translation, etc. If she thinks ou're crazy now, wait until you're driving down the road and start pulling off to the side to write down notes. Maybe it's a good thing I never got married.

                    Plan to get to Boston. Depends on schedule. With as responsive as we try to be with our clients I can literally get 1 or 2 days notice that a client has an emergency and have to crank out a 5 or 10 day special project before the next time I go to bed. (Guess it's a good thing I can still go about 3 days without sleep, a few weeks with a couple hours a day. They're not always the most efficient programming sessions tho.)

                    Comment


                      #25
                      RE: ALPHAB. ORDER= �, e, �, etc.

                      Hi Bill and Ira,
                      Thanks a lot, because I arrived successfully to a solution, with all your participation:
                      I created a function named no_acentos (I mixed French, Spanish and English, sorry)
                      Then, a field named �verbe_s_a�, I maked it calculated type, with the expression : no_acentos(verbe)
                      And that�s all, each time I write a verb in the field �verbe�, automatically the field verbe_s_a writes the same verb, but without accents, no mater which place or haw many letters with accent exists.
                      The function wrote was (almost yours) :

                      function no_acentos as C(verbe)
                      ' Replaces accented characters with unaccented equivalents for ordering '

                      tmpstr = ""
                      for i = 1 to len(verbe)
                      vChar = substr(verbe,i,1)
                      select
                      case between(vChar,"A","Z")
                      vChar = vChar
                      case vChar $ "��������"
                      vChar = "e"
                      case vChar $ "��"
                      vChar = "c"
                      case vChar $ "�����������"
                      vChar = "a"
                      Case vChar $ "��������"
                      vChar = "u"
                      Case vChar $ "����������"
                      vChar = "o"
                      Case vChar $ "��������"
                      vChar = "i"
                      Case vChar $ "���"
                      vChar = "y"
                      case else
                      vChar = vChar
                      end select
                      tmpstr = tmpstr+vChar
                      next
                      no_acentos = tmpstr
                      end function
                      Then I index by "verbe_s_a" and I'd finish.
                      Thank you both, very much
                      J R Tarrag�

                      Comment


                        #26
                        RE: ALPHAB. ORDER= �, e, �, etc.

                        Hi Bill and Ira,
                        Thanks a lot, because I arrived successfully to a solution, with all your participation:
                        I created a function named no_acentos (I mix French, Spanish and English, sorry)
                        Then, a field named �verbe_s_a�, I maked it calculated type, with the expression : no_acentos(verbe)
                        And that�s all, each time I write a verb in the field �verbe�, automatically the field verbe_s_a writes the same verb, but without accents, no mater which place or haw many letters with accent exists.
                        The function wrote was (almost yours) :

                        function no_acentos as C(verbe)
                        ' Replaces accented characters with unaccented equivalents for ordering '

                        tmpstr = ""
                        for i = 1 to len(verbe)
                        vChar = substr(verbe,i,1)
                        select
                        case between(vChar,"A","Z")
                        vChar = vChar
                        case vChar $ "��������"
                        vChar = "e"
                        case vChar $ "��"
                        vChar = "c"
                        case vChar $ "�����������"
                        vChar = "a"
                        Case vChar $ "��������"
                        vChar = "u"
                        Case vChar $ "����������"
                        vChar = "o"
                        Case vChar $ "��������"
                        vChar = "i"
                        Case vChar $ "���"
                        vChar = "y"
                        case else
                        vChar = vChar
                        end select
                        tmpstr = tmpstr+vChar
                        next
                        no_acentos = tmpstr
                        end function

                        Then I index by "verbe_s_a" and I finished

                        Thank you both, very much
                        J R Tarrag�

                        Comment

                        Working...
                        X