Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

dec2base (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the string class.

Syntax

d = dec2base(a, b)

d = dec2base(a, b, c)

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.

Examples

A = 2562525
D = dec2base(A, 36)

Related Topics

base2dec
dec2bin
dec2hex


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit