It would seem that you are unfamiliar with ? as a ternary operator. The code you posted is equivalent to the following:
float GetDepth(TRIANGLE t) {
float z;
z = t.p[0].z;
if (t.p[1].z > z) {z = t.p[1].z;} else {z = z;}
if (t.p[2].z > z) {z = t.p[2].z;} else {z = z;}
return z;
}
And yes, this does find the maximum z in the p array.