Does func works on conditional clause?

Hello,

I’m trying to do the following:

int phiOrder = getARGV("-phiO", 1);
int psiOrder = getARGV("-psiO", 1);


load "Element_P3"
load "Element_PkEdge"

//polinomial order edge
if(phiOrder == 0)
 func Pm = P0edge; 
if(phiOrder == 1)
 func Pm = P1edge; 

//polinomial order volume
if(psiOrder == 2)
 func Pk = P2;
else if(psiOrder == 3)
 func Pk = P3;

but I keep getting the following error:

The identifier Pm exists the existing type is <N5Fem2D8TypeOfFEE> 
the new type is <N5Fem2D8TypeOfFEE>

What am I doing wrong? Or this is not possible?

Best regards!

It is not possible but macro generation you can do,

se example tutorial/Stokes-macro2d-3d.edp :