baseNtoDec(A,n)

Base conversion from any base to decimal.

base N to decimalbase N to decimal


Syntax

o_baseNtoDec(a)
A: scalar Text - value in base n as plain text
n: Int - base to be used
return: decimal (base 10) value

Usage

This implements a general base conversion between decimal and an arbitrary base. The numeric characters 0-9 are used up to base ten, then the alpha characters A-Z up to base 37 and then beyond that are ASCII characters.

Location

menu: veeos ==> Data ==> baseNtoDec

library: dataLib

Example

o_baseNtoDec("A36",27) returns 7377

o_baseNtoDec("A36",16) returns 2614

Notes

This is implemented without loops so is very fast. Only positive integer values are supported.

Reference

Dependencies

Supported On

VEE 7.0+, all platforms

See Also


© 2015-2025. All Rights Reserved. Stan Bischof (stan@worldbadminton.com). Last updated 03 February 2023 13:04.