Now, now, boys, play nice

First of all, I took benny's 216 and I got one stroke down with the Jooel-trick to define the space after the first mayan number and adding that for the rest. So I got a 215 now.
Code:
; begin Mayan Number Converter
;
;!
Function m($)
dim $a
If $+0=$
Do
$m = iif($ mod 20, left('.',$ mod 5 mod 2)+ left('::',$ mod 5/2)+left('|||',$ mod 20/5),'-')+$a+$m
$a = ' '
$ = $ / 20
Until $ = 0
Else
While $
$a = instr('-.:__|', left($,1))
$m = iif($a, $m+$a-1, $m*20)
$ = right($,~)
EndFunction
;!
;!
; end Mayan Number Converter




Code:

Mayan Number Converter passed all 60 tests (100% correct)

KiXtart
KiXtart Version = 4.52 Release Candidate 2
KiXGolf Script = kixgolf_Mnc.kix

Computer
OS = Windows XP Professional
CPU = Intel Pentium Model 13
Speed = 1595 MHz
Memory = 478 MB

KiXGolf Scoring Engine
Scoring Engine = 3.0.3

KiXtart Golf Score
Tournament = KiXtart Golf: Mayan Number Converter
Processing Start = 2006/07/24 08:38:06.541
Processing End = 2006/07/24 08:38:06.551
Duration = 0000/00/00 00:00:00.009
KiXGolf Score = 215

Thank you for participating in KiXtart Golf!



I think I took the ~ trick from a former golf course I've read, or else I've been playing around with all binary operators to see how they would react to different numbers.

The double mod is a result of golfing down the original code. slashing out variables where-ever I could. If I have time I'll rebuilt the code back to the basics so that it's easier to understand.

Brute force? For me, that's a bit icky. Besides, it's a coding contest...

Change variables? I've looked into that too, but it wouldn't have improved my score, or else I would have done it too.

Recursive function? Damn... should have thought of that too!

Jens, looking at the setup and preparation for this, I'm guessing you've spend a lot of work on it.

If there wasn't a perfect test-environment and everything, I prolly wouldn't have even teed off. So in my book, you own the sandbox, and you can change the rules however you seem fit. Thank you for this nice round, and I'm very much looking forward to the next one.