Anyway, to do this I needed use pow() on an array like this:
Code: Select all
float bases[5] = { 0, 1, 2, 3, 4 };
float results[];
results = pow( bases, 2 );
Code: Select all
asm{ pow results, bases, 2 }
I also tried this:
Code: Select all
task main(){
// LocationType p[] = { {10,10}, {30,50}, {55, 20}, {80, 20}, {100, 50} };
LocationType p;// = { 20, 10 };
p.X = 20;
p.Y = 10;
LocationType result;
asm{
pow result, p, 2
// mul result, p, 2
}
NumOut( 0, LCD_LINE1, result.X );
NumOut( 0, LCD_LINE2, result.Y );
for(;;);
}
Does ArraySum() support any form for polymorphism? I tried replicating the way arrop is used by the compiler, but I couldn't figure out how to get sensible results with anything else than simple arrays.
I would expect a behavior like this: (In simple terms)
Code: Select all
//function call: return_value = ArraySum( arr );
return_value = 0;
for( unsigned int i=0; i<ArrayLen(arr); i++)
return_value += arr[i];
(It would at least be beneficial for my bezier curves program ; ) )
Anyway, is there anywhere there is info on how polymorphism is supported by these EF functions?