WRONG WRONG WRONG - see later for explanations - current score is stil 367!!!
Code:
Function vigenere($t,$k,optional $d)
DIM $j,$r,$,$p,$o,$y
For $j=65 To 90
$=CHR($j)+$+CHR($j+32)
Next
$p = "0123456789"+$
For $j = 1 To Len($t)
Do
$ = Left($k,1)
$k = SubSTR($k,2)+$
; $y = InSTR($p,$)
; Until $y
Until InSTR($p,$)
$ = SubSTR($t,$j,1)
$o = $o+($=" ") -$o*(0<InSTR('!.?',$)) $r = InSTR($p,$)
If $r
$ = 62 - (UCase($t+$k)=$t+$k)*26
$ = SubSTR($p,1+($+$r+(2*($d=0)-1)*($y-$o-2)-1) mod $,1)
EndIf
$vigenere = $vigenere + $
Next
EndFunction
Gives:
KiXtart
KiXtart Version = 4.22
KiXforms Version =
KiXGolf Script = KIXGOL~1.KIX
Computer
OS = Windows XP Professional
CPU = Intel Pentium II
Speed = 448 MHz
Memory = 384 MB
KiXGolf Scoring Engine
Scoring Engine = 3.0.3
KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (100%)
Processing Start = 2004/08/02 22:13:45.220
Processing End = 2004/08/02 22:13:45.481
Duration = 0000/00/00 00:00:00.260
KiXGolf Score = 362
Thank you for participating in KiXtart Golf!