decToBaseN(A,n)

Base conversion from decimal to any base.

decimal to base ndecimal to base n


Syntax

o_decToBaseN(a)
A: Int - value in base 10
n: Int - base to be used
return: an ascii string representing the value in base n

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 ==> decToBaseN

library: dataLib

Example

o_baseNtoDec(7377,27) returns A36

o_baseNtoDec(2614,16) returns A36

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.