Web-service) for translation of numbers in verbal representation ("the sum
Makes converting numbers and simple expressions in verbal representation.
Numbers in length up to 15 digits (999 billion)
are processed, verbal representation is formed for three currencies
(rouble, dollar, euro) in English and Russian
- the component functions on computers with
Windows 2000 (on other versions it was not tested)
- It is necessary to establish last version
Microsoft.NET Framework (1.0
- It is necessary to establish last version Windows Scripting Host (5.5
- Files from archive
place in any folder (which will not delete in
the near future) and register assembly in system
by executing command file register.bat.
PROPERTIES and METHODS:
- About - Short description.
- ValutaId - the Identifier of currency (it is possible to set
"R" for roubles, "$" for USD,
"E" for Euro).
- Language - the Identifier of language of verbal representation
(it is possible to set "ru"/1049 for Russian, "en"/1033 for English).
- CheckExpression - Try to calculate expression in Source (boolean).
- CutOffZero - Not
to form representation of zero values of copecks/cents.
- OddMoneyInWords - Form verbal representation of copecks/cents (boolean).
- Source - the reference Value (number or a line) for converting
in verbal representation.
- Result(string) - Result of converting (property by default).
- Convert(string) - Execute converting
a string to return result of converting.
- Execute() - Execute converting value
from Source, place result into Result.
- SetDefault() - Fix the current values
of parameters (ValutaId, Language, CheckExpression, CutOffZero,
OddMoneyInWords) as values "by default"
- RubInWords(num) - Number in roubles.
- UsdInWords(num) - Number in Dollars.
- EurInWords(num) - Number in Euro.
Properties and methods of a component can be used:
- in any .NET-application (import namespace
- in XML Web Services
- in any program, capable
to represent itself as the client of OLE-automation - VB, VC, WSH, MS Office-components,
Delphi etc.(use typelibrary
- test.exe - simple .NET-application (source
in test.vb. To compile use
num2word_ws.zip - example of
using as XML Web
- File conv_test.vbs - examples of use
of the converter in WSH. For start use a command
- File conv_test.xls contains functions
(ToUSD, ToRUR, ToEUR) which can be used for reception of verbal
representation of numbers from cells of the table
in English and Russian languages. At opening a file in MS Excel it
is necessary to allow running macroses.
- During first use the converter establishes own parameters "by default"
according to system adjustments. For change this values
use method SetDefault. An example of use of a method see in a file
- Before use of method Convert property ValutaId can
appropriate value "" (an empty string) or "??
". The method in this case will try to allocate the name of monetary unit
in the handed string.
Updating the program:
The program is written in languages
VB.NET and JS.NET, delivered in
source code. Updating the program needs only the
elementary text editor, the compiler included in .NET
You can make any changes to a code (if something will turn out useful,