Right,

here's my 352 still with vartype()

Code:

function m($)
dim $a, $b, $c, $p
$a = split('- . : .: :: | .| :| .:| ::| || .|| :|| .:|| ::|| ||| .||| :||| .:||| ::|||')
$p = 64000000, 3200000, 160000, 8000, 400, 20, 1
if vartype($) = 3
for $b = 0 to 6
$c = $p[$b]
$m = iif($ >= $c, trim($m + ' ' + $a[$/$c]), iif($m, $m + " -", $m))
$ = $ - $/$c * $c
next
$m = iif($m, $m, '-')
else
$c = split($)
$ = ubound($c)
for $b = 0 to $
$m = $p[6-$+$b] * ascan($a,$c[$b]) + $m
;next
;endif
endfunction



[edit]
in the make I had a helper udf for power of 20, as well as a programmatic building
of the mayan string; Something like this:
$m = $m + left('.',( $} - $}/5) mod 2 ) + left('::',( $}-5*($}/5))/2) + left('|||',$}/5) + ' '
(where $} = $/${ , and ${ = p(6-$e) in a for 0 to 6)
which was of course too long.
That said, have a very nice weekend gentlemen, see you on monday
[/edit]


Edited by Jochen (2006-07-22 02:27 PM)
_________________________