3.5.2.6.8 Decimal

Description

Convert a given string representation in the specified radix into a decimal number.

Syntax

double decimal(string text$, int radix)

Parameters

text

The string representation to be converted. The string can be any combination of (0-9) numbers and (A-Z) letters that is valid in the specified radix. A radix less than or equal to 10 uses numbers only, and a radix greater than 10 mixes numbers and letters as needed. The letters in the combination are not case-sensitive.

radix

The integer of the radix(base) in which text is represented. 2 \leq radix \leq 36.

Return

Return a dicimal number corresponding to text representation in the radix.

Example

decimal(100,2) = ;  //returns 4 
decimal("Origin", 36) = ;  //returns 1497399071
decimal("OriginLab", 36) = ;  //returns 69862651084163