Question: peding number of parameters and optional parameters

Hi there,

it might sound stupid but I wasn't able to program a procedure with

1. peding number of parameters: e.g.

f := proc(a1,a2,...)
....
end proc:

should be good for both f(1,2) as well as f(1,2,3,4,20) and so on.

2. I also wasn't able to program a procedure with an optional parameter:

f := proc(a, opt)
...
end proc:

should be good for f(1) as well as for f(a,"h") etc.

 

Please Wait...