Question: optional values in a proceduer

Hello

I would like to have an optional input value in my procedure. It could be of type string or numeric value.

Example:

bgp:=proc( x, y, z, optional) local bgp, A;

bgp:=Array(1..2);

bgp1 :=pointplot3d([x, y, z]);

# if the optional value exists:

bgp2 :=textplot3d([x, y, z, optional]);

A:=bgp1;

# and if the optional value exists:

A:= seq(bgp1, i = 1..2);

return A;

end proc;

I hope someone can help!

Please Wait...