newRPL - build 1255 released! [updated to 1299]
|
04-19-2019, 01:11 PM
Post: #401
|
|||
|
|||
RE: newRPL - build 1089 released! [update:build 1158]
Hello
I do not know if the following was already discussed: Optional Arguments The RPN commands of the hp48 / 50 interpret a number of fixed arguments, while in the functional standard notation some languages the number of call arguments can be variable if a function is defined as f1 (arg1, [arg2], [arg3], ...) The following three calling options can be made. f1(arg1) [enter] f1(arg1, arg2) [enter] f1(arg1, arg2, arg3) [enter] for example Xcas syntax python PHP Code: #cas legendre_(2), legendre_(2,y), legendre_(2,"list"), legendre_(2,10), legendre_(2,cos(t)) [enter] 1/8*(12*x^2-4), 1/8*(12*y^2-4), poly1[3/2,0,-1/2],2 99/2, 1/8*(12*cos(t)^2-4) I think the only way in RPN is to specify the number of arguments, it can be with the symbols <- arg1 f1 [enter] arg1, arg2 f1←2 [enter] arg1, arg2, arg3 f1←3 [enter] |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 6 Guest(s)