dec

dec — converts numbers into base-10 form.

Syntax

dec (number)

		

Arguments

number

Any number.

Returns

An integer number in decimal format.

Description

This function casts any number to an integer, and returns it in decimal (base-10) representation.

Example

Gamma> dec(0b1100);
12
Gamma> dec(0x3b);
59
Gamma> dec(45.95);
45
Gamma> dec('A');
65
Gamma>  
		

See Also

bin, hex, oct