cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Code blindness

Raiko
16-Pearl

Code blindness

Hello folks,

I have a problem with an algorythm that refuses to do as I wish - maybe it's a case of code blindness from staring to long at the screen.

I tried to write an algorythm that takes a given value from a matrix and subtracts all other values (with the exception of its own value) in this matrix from it.
I don't understand what's wrong. So if anybody has an idea how to change my code...

Thanks a lot in advance

Raiko
3 REPLIES 3

Remove all the 'return L' statements - they are causing your calculation to exit prematurely.

stv

Your problem is the return statement. Return causes a return from the entire expression, not just the innermost program bar. So you never get past the first value of i, as you execute a return and terminate the calculation of the entire region.
__________________
� � � � Tom Gutman

Hello Tom

thanks a ton for your hint - it works!

Raiko
Top Tags