Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/Named-parameters/Maple/named-parameters.maple
Normal file
10
Task/Named-parameters/Maple/named-parameters.maple
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
f := proc(a, {b:= 1, c:= 1})
|
||||
print (a*(c+b));
|
||||
end proc:
|
||||
#a is a mandatory positional parameter, b and c are optional named parameters
|
||||
f(1);#you must have a value for a for the procedure to work
|
||||
2
|
||||
f(1, c = 1, b = 2);
|
||||
3
|
||||
f(2, b = 5, c = 3);#b and c can be put in any order
|
||||
16
|
||||
Loading…
Add table
Add a link
Reference in a new issue