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

How to figure the decimal point

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

    How to figure the decimal point

    Good morning,

    How to find the decimal and get the number before and after decimal point?
    Example - I input the number as " 12.6 " then get the before decimal "12" and after decimal "6" and save it as variable value.

    #2
    Re: How to figure the decimal point

    int(12.6) = 12
    12.6 - int(12.6) = 0.6
    Peter
    AlphaBase Solutions, LLC

    [email protected]
    https://www.alphabasesolutions.com


    Comment


      #3
      Re: How to figure the decimal point

      Or if you are entering character values as your sample indicates....

      Code:
      value = " 12.6 "
      ? word(value,1,".")
      = " 12"
      ? word(value,2,".")
      = "6 "
      There can be only one.

      Comment


        #4
        Re: How to figure the decimal point

        Thank you

        Comment


          #5
          Re: How to figure the decimal point

          Tom and Stan

          The basic concept is fine However how to hold the integral number as "10" not "1"?
          Code:
          dim vImperial as n
          vImperial = 5.10
          
          vBefore = int(vImperial)
          vAfter = vImperial-vBefore
          vC
          vMetric = vBefore+vConvert
          
          ?vAfter
          = 0.1 [COLOR="Red"](Wrong. It should be as 10)[/COLOR]
          
          ?vc [COLOR="Red"](Wrong. It should be as 0.833)[/COLOR]
          
          ?vmetric
          = 5.008 [COLOR="Red"](Wrong. It should be as 5.833)[/COLOR]
          or How to convert the Imperial number(progressing by 12th) to computer or calculator (progressing by 10th) number?

          Comment


            #6
            Re: How to figure the decimal point

            John,

            What type of Imperial measurements are you trying to convert to and from? Mass, volume, volume-dry, distance, etc. ?

            AS:

            http://www.france-property-and-infor...rial-units.htm

            Ed

            Comment


              #7
              Re: How to figure the decimal point

              Ed,

              I need a Imperial Calculator, not conversion.

              Imperial Sample: 5 feet 10inch x 5 feet 10 inch = 34.023 Area

              In Typical Calculator: 5.10 * 5.10 = 26.01 area

              I have to change the 10 inch into 10th number in order to use the typical calculator
              a) 10 * 0.083333 = 0.833
              b) 5.833 x 5.833 =34.023

              Comment


                #8
                Re: How to figure the decimal point

                Wrong answer, I was confused by your example.
                Last edited by Stan Mathews; 11-05-2010, 08:57 AM.
                There can be only one.

                Comment


                  #9
                  Re: How to figure the decimal point

                  John,

                  Look at this.

                  http://joshmadison.com/software/convert-for-windows/

                  Edit: Should have woke up before posting, but this is a conversion program for download.

                  I use mostly metric at work everyday. What mostly are you doing? Cubes, SqArea, Mass, ??

                  Ed

                  Comment


                    #10
                    Re: How to figure the decimal point

                    Ed and Stan

                    Thank you for your information but my problem is not the conversion table issue. My problem is changing imperial number to computing number.

                    The Computer and most calculator is increased the number by "every 10th" but the imperial number is increase by every 12th.

                    Now, I'd like to calculate 5 feet 10 inch times 5 feet 10 inch. Using the Inch calculator, I have to enter as 5 feet(button on the calculator) 10 * 5 feet 10 = 34.02778

                    If I use the typical calculator and get the right number,
                    Step a - covert the Inch to 10th number, 10 * (1/12) = 0.8333 or 10/12(*inch)
                    Step b - Enter as 5.8333 * 5.8333 then result is 34.0256.

                    Here, I just found my it. Now I can apply it into my xDialog.
                    Code:
                    dim vImp as c 
                    vImp = "5'10"
                    vBef = val(word(vimp,1,"'"))
                    vaft = val(word(vImp,2,"'"))/12
                    vMetric = round(vbef+vaft,4)
                    
                    dim vHts as c 
                    vHts = "5'10"
                    vBefHts = val(word(vHts,1,"'"))
                    vaftHts = val(word(vHts,2,"'"))/12
                    vMetHts = round(vbefHts+vaftHts,4)
                    
                    'Final
                    vResult = Round(vMetric * vMetHts,2)
                    ?vresult
                    = 34.03

                    Comment


                      #11
                      Re: How to figure the decimal point

                      Yes, but that's a different set of parameters than you first posted. Then it was

                      Code:
                      dim vImperial as n
                      vImperial = 5.10
                      ........
                      Much simpler issue when you use


                      Code:
                      dim vImp as c 
                      vImp = "5'10"
                      There can be only one.

                      Comment


                        #12
                        Re: How to figure the decimal point

                        Originally posted by johnkoh View Post
                        the imperial number is increase by every 12th.
                        ??!!
                        I thought Imperial is in increments of 1/16.

                        At any rate, you probably need this function:
                        INCHESTOCM()
                        Or you could make your own.

                        Comment


                          #13
                          Re: How to figure the decimal point

                          Right, based on the first post, it would be:

                          dim v1 as C="5.10"
                          dim v2 as C="5.10"
                          vn1=val(word(v1,1,"."))+(val(word(v1,2,"."))/12)
                          vn2=val(word(v2,1,"."))+(val(word(v2,2,"."))/12)

                          ? round(vn1*vn2,2)
                          = 34.03
                          Gabe,
                          As you are aware, The 12th is 12 inches in a foot
                          Mike W
                          __________________________
                          "I rebel in at least small things to express to the world that I have not completely surrendered"

                          Comment


                            #14
                            Re: How to figure the decimal point

                            Mike,

                            Thank you and greater style.

                            Comment


                              #15
                              Re: How to figure the decimal point

                              Originally posted by Mike Wilson View Post
                              Gabe,
                              As you are aware, The 12th is 12 inches in a foot

                              Yeh.. I was thinking increments per inch. If you want, you could translate the whole thing to centimeter as in:

                              Code:
                              dim vimperial as c="5'10"
                              ?inchestocm(val(word(vimperial,1,"'"))*12+val(word(vimperial,2,"'")))
                              = 177.8
                              Mike.. I am not sure about your math?
                              Last edited by G Gabriel; 11-08-2010, 06:54 PM.

                              Comment

                              Working...
                              X