dec_to_base (MathScript RT Module Function)

LabVIEW 2012 MathScript RT模块帮助

版本日期:June 2012

产品编号:373123C-0118

»查看产品信息
下载帮助
(仅限Windows)

Owning Class: string

Requires: MathScript RT Module

Syntax

d = dec_to_base(a, b)

d = dec_to_base(a, b, c)

Legacy Name: dec2base

Description

Converts a decimal number to a base b number represented by a string.

Examples

Inputs

Name Description
a Specifies a decimal number. a is an integer between 0 and 2^52-1. LabVIEW rounds a if a is not an integer.
b Specifies the base to which you want to convert a. b can be any integer between 2 and 36.
c Controls the number of digits in d. If d has fewer than c digits, LabVIEW pads the beginning of d with zeros. c is an integer.

Outputs

Name Description
d Returns a base b number equivalent to a with at least c digits. The base b notation uses the following digits: 0, 1, ... , 9, A, B, ... , Z. d is a string.

Details

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT Not characterized

Examples

A = 2562525
D = dec_to_base(A, 36)

Related Topics

base_to_dec
dec_to_bin
dec_to_hex

文章是否对您有帮助?

没有帮助