difference for a array is not defined. It could be anything really, it could reefer to the difference between the sums, inverse polish notation stack operation of some kind, element elimination by similliarity.....
Wich is why theres no automatically commend syntax for these kinds of stuffs in most languages, because it can mean many things. Its like asking for a honest politician (they do exist but you cant separate them form the rest).
But i assume you mean difference by element in 2 arrays.
its ratther easy.
CODE
proc float[] fArrayElemDif(float $array1[],float $array2[]){
float $arrayOut[];
$a=size($array1);
for ($i=0;$i<$a;$i++){
$arrayOut[$i]=$array1[$i]-$array2[$i];
}
return $arrayOut;
}
mel cant overload so you must make a version for each type
to test run
fArrayElemDif({1.0,2,3,4},{5.5,6,7,8})
However this is potentially a out of mel scope programming target.