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

little help: max function name lenght

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

    little help: max function name lenght

    Ok, I swear I looked for it, with no luck.
    How much characters could be the name of a function long?
    The wizard to create new functions stops me after 24 chars, but if manually edit the code I can create longer names.
    I would like to understand is 24 chars is a real limit, and for example, if A5 has problem selecting between different functions with the same first 24 chars.
    Maybe it's just a limit for the wizard.
    Thanks for all the help you give me!
    E.

    #2
    Re: little help: max function name lenght

    Maybe it's just a limit for the wizard.
    Yes. The wizard is just a starting point much as you can do much more than the report genie allows upon initial setup.
    There can be only one.

    Comment


      #3
      Re: little help: max function name lenght

      OK, just another doubt.
      If I want to create a new function I must use "new" or "duplicate", and I'm forced to the 24 chars limit.
      Now, if I change the definition in the code editor, I can completely change the name, but it will remain unchanged in the function list.
      This is somehow weird 'cos if I want to call a function I cannot rely on the name displayed but I must refer to the name coded.
      Do you confirm it? or I'm doing something wrong?
      Is there a sort of workaround for it?
      thx, E.

      Comment


        #4
        Re: little help: max function name lenght

        Not sure what your issues is. If you define a function via the wizard.

        function sayHello as c (name as c )
        sayHello = "Hello: " + name
        end function
        Save it.
        Open it in design mode
        Save it with the name ------ my_big_long_say_hello_custom_function
        Edit the first line to
        function my_big_long_say_hello_custom_function as c (name as c )
        sayHello = "Hello: " + name
        end function

        You will see that function on the code tab and you can calli it with that name.
        There can be only one.

        Comment


          #5
          Re: little help: max function name lenght

          Hi Enrico,

          Originally posted by getaguru View Post
          OK, just another doubt.
          If I want to create a new function I must use "new" or "duplicate", and I'm forced to the 24 chars limit.
          Now, if I change the definition in the code editor, I can completely change the name, but it will remain unchanged in the function list.
          This is somehow weird 'cos if I want to call a function I cannot rely on the name displayed but I must refer to the name coded.
          Do you confirm it? or I'm doing something wrong?
          Is there a sort of workaround for it?
          thx, E.
          First of all, see my Code Editor, Function and Variable Limits tips and Variable & Code Naming Limits tips on my tips page.

          Global Function names are essentially variables names that are pointers to a global object in Alpha that has a type of "F". Thus it is essentially limited in naming to variable names.

          While Alpha Five can tolerate longer names in some places, and in fact violates their own rules in system functions they have created, it is a bad idea.

          Long names can be useful, but too long of names can be tedious and overly complex. I don't think you can come up with a really good reason for a longer than 24 character name for a function.

          Also, Alpha Software can potentially changes things in the future (e.g. they had experimented with a code compiler in the past, that maybe only looks at the 1st 24 characters). They also, may not test that really long names work in all places. E.g the code editor. The storage of code in the alb, alm and alx file, only have space for 24 characters in the name. When you compile code into an AEX, it takes the name from the function definition line in the code, and thus could be longer. But if you try editing two functions with the same 1st 24 characters, I believe they would overwrite each other. I suggest not playing with fire.

          You may also want to read AIMS (Cal Locklin) tips on Alpha Five naming. There is a link near the top of my tips page.
          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


            #6
            Re: little help: max function name lenght

            thx everybody for the answers.

            @Stan
            Originally posted by Stan Mathews View Post
            Open it in design mode
            Save it with the name ------ my_big_long_say_hello_custom_function
            Did you really try doing it?
            Because if I try to use the "save as" command, or the rename command, or the copy to command, or whatever else command that can rename the function, A5 limits the chars to 24.
            If I try to put in a longer names simply the keyboard stops affecting what I'm writing.
            Instead, I can choose the name I want in the definition inside code editor, in other words function this_name_can_really_be_long_as_I_would_like_to_be_name_fuction as c (name as c ) is accepted.
            I guess that I can call the function in other scripts with this name and it will works.

            @Ira
            the page you linked me is a gold mine.
            and what you wrote in the post is exactly what I was trying to understand.
            The point is that I must disagree (even if I'm short experienced with A5), I think that 24 chars is a disheartening limitation.
            I love to keep my code in order, and it would be great if A5 permits me to organize my functions in folders, for example.
            Instead, I must see my functions thrown in a pot with scripts, menus, toolbars, porks, beans and bitmaps (bitmaps??????, yes, bitmaps)
            So I started using a personal code to name it, and names became things like A_I_P_link_service_2_invoice_by_year_by_user as L (invoice_id as n, user_id as n etc...)
            Yes, I can short it: A_I_P_ln_srv_inv_by_y_usr as L (....), but readability is much harder...
            Well, my two cents. Any advice is welcome.
            Last edited by getaguru; 02-04-2013, 02:31 PM.

            Comment


              #7
              Re: little help: max function name lenght

              Naming conventions have been discussed on this board many times. A good convention for script names is as essential as for table names, form names, etc. I certainly have a fairly strict convention that I use. All bmps are named zzbm_<name>, and all toolbars are zztb_<name> to keep them together, and utility scripts are all util_<name> (as the one I have attached is in my db). But the name limitation is a limitation, and when you get to 300+ scripts in an app, you need something more. So I have come to add commented out keywords within my scripts that relate to source of call (form object, parent script, etc), script objective and actions, tables addressed, and other language that optimize retrieving them quickly, and use the attached script called from a button on my Control Panel toolbar which allows me to search a scripts content and retrieve them. Therefore, I have something well beyond the name of the script as a resource for retrieval.
              Attached Files
              Last edited by Mike Wilson; 02-04-2013, 03:02 PM.
              Mike W
              __________________________
              "I rebel in at least small things to express to the world that I have not completely surrendered"

              Comment


                #8
                Re: little help: max function name lenght

                Thanks! great advice, I haven't thought about commented keywords system,... and I like it.
                But... is there not a built-in function to search inside the text of all the code of a project?

                ...and thank you for sharing your code! E.

                Comment


                  #9
                  Re: little help: max function name lenght

                  Mike,

                  Your script does not work for me with v10.5. To clarify how I tested, I put a line in a script in the Code tab of the CP as follows:

                  'test

                  Saved, then ran your script from a button on a form and I get nothing in the FOUND dialog box.

                  Am I doing something wrong? (Probably!)

                  Raymond Lyons

                  Comment


                    #10
                    Re: little help: max function name lenght

                    Ray,
                    Sorry. I use all UDFs. You probably use scripts. Try this one (attached) which searches both.
                    Attached Files
                    Last edited by Mike Wilson; 02-05-2013, 04:45 PM.
                    Mike W
                    __________________________
                    "I rebel in at least small things to express to the world that I have not completely surrendered"

                    Comment


                      #11
                      Re: little help: max function name lenght

                      Originally posted by Mike Wilson View Post
                      Ray,
                      Sorry. I use all UDFs. You probably use scripts. Try this one (attached) which searches both.
                      Mike, I use UDF's and scripts (autoexec if nothing else) with everything password protected. So now if I put my password into your 2nd script, it does find the UDF's but it does NOT find any scripts with the test word in them, whether the script is password protected or not.

                      Ray

                      Comment


                        #12
                        Re: little help: max function name lenght

                        Ray,
                        download the file again in a little bit. I grabbed the wrong txt file. Sorry again. I'll post a correct version in a minute.

                        Later: OK here it is and I think it now does work
                        Attached Files
                        Last edited by Mike Wilson; 02-05-2013, 05:23 PM.
                        Mike W
                        __________________________
                        "I rebel in at least small things to express to the world that I have not completely surrendered"

                        Comment


                          #13
                          Re: little help: max function name lenght

                          Originally posted by Mike Wilson View Post
                          Ray,
                          download the file again in a little bit. I grabbed the wrong txt file. Sorry again. I'll post a correct version in a minute.

                          Later: OK here it is and I think it now does work
                          Mike,

                          Now it works like a charm. Users just have to remember that if they use passwords, they have to change your "mypassword" in the script.

                          Wait, they'll have to remember something else too: The word you choose to use as a key word to find UDF's and scripts has to in a certain sense be unique. For example, I have many UDF's and scripts that have the word "APR" in commented lines (it's a word to me!), with "APR" usually in the middle of a commented sentence, not at the beginning. Thus if I were to use "APR" as a key word for this purpose searching for "APR" would find tons of unwanted things. Not sure this is a real problem, but if it were I suppose Mike could limit the search to the first n characters of the commented line (with ' always being the 1st character and n being the length of the search string + 1). Mike, if you make a change like that, please post it back here for use by others. I think this system of yours makes a lot of sense whenever an app grows to have lots of UDF's and scripts.

                          Thanks Mike.

                          Ray

                          Comment


                            #14
                            Re: little help: max function name lenght

                            Ray,
                            Certainly that can happen. I keep my keyword within a delineator boundary of 'xxxxxxxxxxxxxxx. If that convention is used, then if the user writes the keyword text within that boundary is that which is inspected in the search of this script can be easily achieved. However, the primary reason I wrote this script is to evaluate the presence of nested UDFs, and therefore wanted to look through the entire script. The keyword component came after the fact as a bonus. All in all, do with it as is needed.

                            And BTW, the script will not "detect and evaluate" a script that open in design mode.
                            Mike W
                            __________________________
                            "I rebel in at least small things to express to the world that I have not completely surrendered"

                            Comment


                              #15
                              Re: little help: max function name lenght

                              Hi Mike,

                              See this post about my LIBMAKE function of the CSDA Code Utility. It uses directives in comments that are very similar to things you have to determine the dependencies of various code pieces on each other, and to build an AEX based upon these. In particular, look at the PACKAGES, INCLUDE and EXTERNAL directives.

                              There are also various flags in LIBMAKE() that try to return the user functions and scripts referenced by each script (albeit, not perfect), and allow other related information returned.

                              Also, for others, press F6 in the code editor to do a global search of the code. It doesn't work with password protected code (unless previously opened in the code editor I believe), so it has limitations. I have a replacement Global Search function that actually prompts for passwords, but it is unreleased.

                              Also, I haven't looked at your search code, but I would recommend adding a password parameter that allows one or more passwords to be specified, which is what my code that requires passwords for code processing does.
                              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