Re: help?

new topic     » goto parent     » topic index » view thread      » older message » newer message
kobi said...

I'm sorry, I'm probably so dense today.
I can't see what's wrong in this little piece of code:

include std/math.e 
 
function minmax(atom min, atom max, atom val) 
    atom temp = max ({min, val}) 
    atom res = min({max, temp}) 
    return res 
end function 
 
? minmax(7.2,99,6) 

thanks in advance, kobi

besides reusing the max name? surprisingly legal in euphoria more often than not, but always confusing. another reason is to avoid catching euphoria on a bad day with an edge case. try something else more direct if it looks like a bug.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu