Functions

bc

Supported By

Syntax

[the] bc of ( expression , sourceBase , destinationBase )

bc ( expression , sourceBase , destinationBase )

Expression yields a string. SourceBase and destinationBase yield positive integers between 2 and 36, inclusive.

Example

put bc("09F91102", 16, 10) into myNumber

Description

The bc function converts a real or complex number in any base, or radix, to the same number in another base. For example, bc("FF",16,10) gives "255", and bc("255",10,16) gives "FF".

Note

If the given sourceBase or destinationBase is less than 2 or greater than 36, a script error is triggered.

See Also

bin, hex, oct