View/Edit #132:tobignum

Switch to edit mode.

Name(s): tobignum
1:  {n} = args
2:  if (typeof(n) == $INT)
3:    r = {}
4:    while (n)
5:      r = {n % 256, @r}
6:      n = n / 256
7:    endwhile
8:    return encode_binary(r)
9:  elseif (typeof(n) == $STR)
10:   r = ""
11:   for x in [1..length(n)]
12:     r = this:product(r, "~0A")
13:     r = this:sum(r, encode_binary(toint(n[x])))
14:   endfor
15:   return r
16: else
17:   raise(E_TYPE)
18: endif
19: "Last modified by manta (#7165) on Wed Feb 16 03:01:36 2000 MST."
20: "This verb previously owned by manta (#7165), and chowned to $slacker upon dewizarding (Sat Aug 17 14:50:05 2002 MDT)."
21: "Last modified by Dax (#789) on Tue May  3 13:43:07 2005 MDT."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Slacker (#55)

You are not logged in.

[home | help | who | search | setup | code]