Tech Tip - Number to Word Conversion

Some of your business processes are complex, some are simple. Let's look at check writing as an example. This is a really simple process, but you can run into one small snag.

When writing checks, you likely want to spell out the dollar amount that the check is for as an additional security feature.

$1023.23 = One Thousand Twenty-Three and Twenty-Three Cents.

There is no OCONV function that will do this for you, so this simple little program will likely come in handy:

NUMBER = "127.35"
CALL NUMBER.TO.ALPHA(NUMBER,INT.WORD,DEC.WORD,"0")
CRT "NUMBER: ": NUMBER
CRT "WORD: ": INT.WORD :" AND ": DEC.WORD :" CENTS"
END

This will produce the following results:

NUMBER: 127.35
WORD: ONE HUNDRED TWENTY-SEVEN AND THIRTY-FIVE CENTS

In addition to converting numbers into dollar formats, you may need to convert it into a alpha counting formats, such as:

NUMBER: 127.35
WORD: ONE HUNDRED TWENTY-SEVENTH POINT THIRTY-FIFTH

You can download the code for this subroutine from:

http://www.intl-spectrum.com/resource/173/Numeric_To_Alpha_Conversion.aspx

Nathan Rector

Nathan Rector, President of International Spectrum, has been in the MultiValue marketplace as a consultant, author, and presenter since 1992. As a consultant, Nathan specialized in integrating MultiValue applications with other devices and non-MultiValue data, structures, and applications into existing MultiValue databases. During that time, Nathan worked with PDA, Mobile Device, Handheld scanners, POS, and other manufacturing and distribution interfaces.

In 2006, Nathan purchased International Spectrum Magazine and Conference and has been working with the MultiValue Community to expand its reach into current technologies and markets. During this time he has been providing mentorship training to people converting Console Applications (Green Screen/Text Driven) to GUI (Graphical User Interfaces), Mobile, and Web. He has also been working with new developers to the MultiValue Marketplace to train them in how MultiValue works and acts, as well as how it differs from the traditional Relational Database Model (SQL).

View more articles

Featured:

Sep/Oct 2010

menu
menu