Okay, Golf fanatics!

Time's up and you're allowed to post your code now. So take a look at the competitor and try to improve your code!

Lonkero: Must be torture for you to look at other people's code and not do anything about it [Wink]

Here's my code with a KiXtart Golf score of 702
code:
; beginning of the Anagram() UDF and supporting UDFs
;!
function anagram($)
dim $c, $d, $e, $b, $a, $i, $o, $f

if ubound($)<0
$f=''
else
$=s($)

$i=ubound($)

$f=$
for $c=0 to $i
$o=$[$c]
redim $l[25]
for $b=1 to len($o)
$a=asc(substr($o,$b,1))-97
$l[$a]=$l[$a]+1
next
$f[$c]=join($l)
next

for $c=0 to $i-1
for $d=$c+1 to $i
if $f[$c]=$f[$d] and $[$d]
$[$c]=$[$c]+' '+$[$d]
$[$d]=''
endif
next
next

$o=$
for $c=0 to $i
$d=split($[$c])
if ubound($d)
$o[$c]=right('0'+ubound($d),2)+$d[0]
endif
next

$o=s($o)

$f=$
$e=0
for $c=0 to $i
for $d=0 to $i
$b=substr($o[$c],3)
if $b=split($[$d],' ')[0] and $b
$f[$e]=$[$d]
$e=$e+1
endif
next
next
if $e
redim preserve $f[$e-1]
else
$f=''
endif

endif

$anagram=$f

endfunction
function s($)
dim $i,$j,$k,$m,$n
$k=ubound($)
for $i = 0 to $k
for $j = $i + 1 to $k
$m = $[$i]
$n = $[$j]
if $n < $m
$m = $n
$[$j] = $[$i]
$[$i] = $m
endif
next
next
$s = $
endfunction
;!
;!
; end of the Anagram() UDF and supporting UDFs



[ 21. August 2002, 21:11: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.