I'd like to do something similar as in the issquare-function: How do I code this? For example: I want to program a function foo such that y=foo(x) yields y=x^2 and y=foo(x,&n) yields y=x^2 and n=floor(x^2).Is there a reference that explains proramming of user defined functions in depth?