Scripting competition

Colin Holgate coiin at rcn.com
Mon May 11 19:16:10 EDT 2009


Ok, I feel sure there's some recursive way that would be harder to  
read, and fewer lines, but this'll do:

on mouseUp
    ask "How Big"
    if it is not empty then answer fibber(it)
end mouseUp

function fibber n
    put 0 into n1
    put 1 into n2
    repeat with a = 2 to n
       put n1+n2 into t
       put n2 into n1
       put t into n2
    end repeat
    return t
end fibber






More information about the use-livecode mailing list