Dec$ Function

Purpose

converts an integer expression to decimal representation.

Syntax

Dec[$](m[,n]

Description

Dec[$](m[,n] converts the integer expression m into decimal representation. This is a base 10 number system with digits from 0 to 9. The optional parameter n specifies how many places should be used. If n is greater than the number of places needed by m, the number is padded with leading zeros.

Example

OpenW # 1

Print Dec$(25)    // Prints 25

Print Dec(123, 6) // Prints 000123

Remarks

Without the optional $ character the function still returns a String data type and not a Variant.

See Also

String, Bin$(), Hex$(), Oct$()

{Created by Sjouke Hamstra; Last updated: 28/09/2014 by James Gaite}