Project

General

Profile

$base » History » Version 3

Per Amundsen, 08/05/2015 11:18 PM

1 1 Per Amundsen
_Added in 1.9.0_
2
3
*$base(N,inbase,outbase,zeropad,precision)*
4
5
Converts number N from inbase to outbase. The last two parameters are optional.
6
7
*Parameters*
8
9
N - The number to convert.
10
inbase - The base to convert from.
11
outbase - The base to convert to.
12 3 Per Amundsen
zeropad - Pad numbers to this length.
13 1 Per Amundsen
precision - TODO
14
15
*Example*
16
17
<pre>
18
;Returns F
19
//echo -ag $base(15,10,16)
20
21
;Returns 1.8
22
//echo -ag base(1.5,10,16)
23
24 2 Per Amundsen
;Returns 002
25 1 Per Amundsen
//echo -ag $base(2,10,16,3)
26
</pre>