btw here is a 357 score based on Rogier's code
Your solution passed all tests
KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_ts.kix
Computer
OS = Windows 2000 Professional
CPU = Intel(R) Pentium(R) 4 CPU 2.80GHz
Speed = 2793 MHz
Memory = 504 MB
KiXGolf Scoring Engine
Scoring Engine = 3.3
KiXtart Golf Score
Tournament = Top Secret
Processing Start = 2007/08/10 10:57:05.796
Processing End = 2007/08/10 10:57:05.828
Duration = 0000/00/00 00:00:00.031
KiXGolf Score = 357
Thank you for participating in KiXtart Golf!
Code:
Function a($b, $p, $, $h)
dim $c, $r, $x
Do
$x = Left($, 1)
$c = LCase($)
If $c>` & $c<{
$r = $r + $x
$x = Chr(1)
EndIf
$a = $a + $x
$ = Right($,~)
Until $=0
$p = Split($p,',')
For $c = 0 to ($r^) - 1
While $b + $c - $ > ($r^)
$p = Split(Right(Join(Split(' ' + Join($p), ' ' + $b), ''), ~))
$b = $b - 1
Loop
$x = InStr($a,Chr(1))
$a = Left($a,$x - 1) + Substr($r, $c + iif($h = E, $p[$], Ascan($p, $ + 1) + 1) - $,1) + Substr($a, $x + 1)
$ = ($ + 1) mod $b
EndFunction
No need for that parens there,no?