Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Hi everybody,

Can some want know a technics script to convert a number to a text.

Ex: 120 - Hundred and twenty

I really appreciate that.

This is a big job because it all has to be hard-coded in. Because it's hard-coded it will have a limit to the maximum number it will process.

I think (not sure) that there is a calculation that does this at http://www.databasepros.com in the tips section or something.

I have done this for numbers up to 999,999,999. I found the best tradeoff between complexity and effort is to use a combination of calculations and a related file that holds the text version of numbers from 1 to 99.

Break the number into groups of 3 digits. The first group is millions; the second group is thousands, and the last is units. Each of these is then broken into sub-groups consisting of the first digit, and the last two digits. This gives a total of 6 sub-groups. Create six relationships between the main file and the text lookup file based on each of these sub-group values.

Each group is processed the same way. If a group is > 99 then lookup the text equivalent for the first digit and append "hundred" then lookup and concatenate the text for the last two digits. If the group value is zero, the resulting text should be an empty string.

For the first group, if the string is not empty, append "million "

For the second group, if the string is not empty, append "thousand "

Finally, concatenate all strings together.

  • 2 weeks later...
  • Author

Thanks a lot I found a lot of useful tip .

quote:

Originally posted by Vaughan:

This is a big job because it all has to be hard-coded in. Because it's hard-coded it will have a limit to the maximum number it will process.

I think (not sure) that there is a calculation that does this at
in the tips section or something.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.