Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,24 +1,15 @@
|
|||
func$ num2str n base .
|
||||
if n = 0
|
||||
return "0"
|
||||
.
|
||||
if n = 0 : return "0"
|
||||
d = n mod base
|
||||
if d > 9
|
||||
d += 39
|
||||
.
|
||||
if d > 9 : d += 39
|
||||
d$ = strchar (d + 48)
|
||||
if n < base
|
||||
return d$
|
||||
.
|
||||
if n < base : return d$
|
||||
return num2str (n div base) base & d$
|
||||
.
|
||||
func str2num s$ base .
|
||||
r = 0
|
||||
for c$ in strchars s$
|
||||
d = strcode c$ - 48
|
||||
if d > 9
|
||||
d -= 39
|
||||
.
|
||||
if d > 9 : d -= 39
|
||||
r = r * base + d
|
||||
.
|
||||
return r
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue