View/Edit #1:rank

Switch to edit mode.

Name(s): rank
1:  ":rank([long]); => Rank"
2:  "Returns the rank of this."
3:  "If args[1] is given, returns a string args[1] letters long, otherwise returns the full string."
4:  {?length = -1, ?names = {1, 1, "???"}} = args
5:  if (length == -1)
6:    return names[$]
7:  elseif (length > length(names))
8:    name = names[$]
9:  else
10:   name = names[pos = length]
11:   while (typeof(name) != $STR)
12:     name = names[pos = pos + name]
13:   endwhile
14: endif
15: return $string_utils:left(name, length)
16: "Last modified by Dax (#789) on Mon Aug  7 21:32:55 2006 MDT."

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

You are not logged in.

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