optional values in a proceduer

March 23 2011 by Budgie 10
false
Maple

0


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!

 
Loading Comments & Answers

You must be logged into your MaplePrimes account in order to post a comment. If you don't have an account, you can create an account here.

     

Forgot Your Password? Create an Account