Stata 15 help for inten

Title

[P] inbase -- Base conversion

Syntax

inbase #1 #2

inten #1 #2

where #1 is the base integer and #2 is the integer to be converted. #1 must be between 2 and 62, inclusive.

Description

inbase converts decimal integers to the specified base.

inten converts integers of the specified base into decimal integers.

Examples

. inbase 16 29 1d

. inbase 2 29 11101

. inten 16 1d 29

. inten 2 11101 29

Stored results

inten returns

scalar r(ten) containing integer in base 10

inbase returns

local r(base) containing integer in specified base

Bugs

inten does not verify that you do not use digits beyond the base. For instance, you can type inten 16 1g.


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index