# Question:Alternative Argument spelling in a procedure

## Question:Alternative Argument spelling in a procedure

Maple 2023

This is something I use a fair bit. I have procedures with alternative spelling options for the colours Red Green and Blue.
Have shown a single example copied from  an overloaded procedure. It there a nicer way of handling this than what I am doing?
There is a section in help under "Procedure Parameter Declarations" on "Indexed Keyword Parameters"  but I don't see how to use it here. These procedures are used inside a package.

 > restart
 >
 > GeomClr:="Blue";  # can be "Blue", "blue", "B", "b"  or;                   #        "Green", "green", "G", "g"  or;                   #        "Red2, "red", "R", "r"; Prntmsg:="y" ; #  or anything that is not"y"
 >
 (1)
 > spread:=proc(p0::{satisfies(s -> type(s, [algebraic \$ 2])),'Vector[row]'(2, algebraic)},               p1::{satisfies(s -> type(s, [algebraic \$ 2])),'Vector[row]'(2, algebraic)},               clr::`string`:= GeomClr,               prnt::`string`:=Prntmsg)            option overload;            uses LinearAlgebra;            #print(clr,p0,p1);            if clr="b" or clr="B" or clr="blue" or clr="Blue" then               if prnt="y" then                 print("Spread 2 [x,y] Points/Vectors wrt origin Blue");               end if;                return 1 - BilinearForm(p0, p1, conjugate = false)^2/(BilinearForm(p0, p0, conjugate = false)*BilinearForm(p1, p1, conjugate = false));            elif clr="g" or clr="G" or clr="green" or clr="Green" then               if prnt="y" then                print( "Spread 2 [x,y] Points/Vectors wrt origin Green");               end if;                return -1/4*(p0[1]*p1[2] - p0[2]*p1[1])^2/(p0[1]*p0[2]*p1[1]*p1[2]);            elif clr="r" or clr="R" or clr="red" or clr="Red" then               if prnt="y" then                print( "Spread 2 [x,y] Points/Vectors wrt origin Red");                end if;                return -(p0[1]*p1[2] - p0[2]*p1[1])^2/((p0[1]^2 - p0[2]^2)*(p1[1]^2 - p1[2]^2));           end if;           end proc:
 (2)
 (3)
 (4)
 > 1/sb+1/sr+1/sg
 (5)