well, d'oh

109 \:\)

 Code:
function a($)
    $ = (instr(cake,substr($,4,1)) + 5 - instr(cake,substr($,instr($,',')+4,1))) mod 5
    $a = $ - 2*($>2)
endfunction
_________________________