english - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


convert/english

convert a number to English

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

convert(n, english, opt)

convert(m, english, cardinal, opt)

convert(n, english, integer)

convert(p, english, ordinal)

Parameters

m

-

integer

n

-

an integer or string

opt

-

(optional) equation of the form And = true or And = false

p

-

nonnegative integer

Description

• 

For an integer n, the calling sequence convert(n, english) converts n to a string representation in words. For example, convert(5,english) returns the string "five". If n is a string, the reverse conversion is performed.

• 

The calling sequence convert(n, english, cardinal) does exactly the same conversion as convert(n, english) for an integer n, and similarly convert(n, english, integer) does the same conversion as convert(n, english) for a string n.

• 

These calling sequences use the so-called short scale: that is, "one billion" represents the number  rather than .

• 

If the option And = true is specified, then this command includes the word "and" after the hundreds in numbers such as "six hundred and eighty-four". Specifying just And is equivalent to specifying And = true. If And = false is specified, then that same number is spelled as "six hundred eighty-four". The default is And = false.

• 

Numbers greater than or equal to one thousand vigintillion () in absolute sense are not supported.

• 

The calling sequence convert(p, english, ordinal), for a nonnegative integer p, returns a string with the number p followed by a suffix to indicate an ordinal number in English. For example, convert(5, english, ordinal) returns the string "5th".

Examples

Cardinal numbers

Not supplying a third argument is the same as using the argument cardinal.

(1)

(2)

Negative numbers are supported.

(3)

The And option specifies whether the word and is included.

(4)

(5)

Large numbers are also supported.

(6)

Very large numbers are not supported:

(7)

Error, (in positive) number 1000000000000000000000000000000000000000000000000000000000000000000 is too big

Reverse Conversion of Cardinal Numbers

All reverse conversions are supported.

(8)

(9)

(10)

(11)

An optional second option integer can be used for clarity.

(12)

Ordinal numbers

Supplying ordinal as the third argument gives ordinal numbers.

(13)

(14)

(15)

Negative numbers are not supported.

Error, (in `convert/english`) only nonnegative numbers can be converted to ordinal form

Compatibility

• 

The convert/english command was introduced in Maple 17.

• 

For more information on Maple 17 changes, see Updates in Maple 17.

• 

The convert/english command was updated in Maple 2019.

• 

The n parameter was updated in Maple 2019.


Download Help Document