in reply to Re: Spurious `undefined' values and conversion issues
in thread Spurious `undefined' values and conversion issues
Many thanks for your nice reply, graff.
Regarding the uninitialized values, it is very much due to $j being too large (through a rather pesky typo, that had evaded my checking). The $k value should be fine as this should always be smaller compared to $j. However, now that you have brought it up, I should write an appropriate die command if $k >= $j. Also, your suggestion regarding += has been taken on board as this is more elegant, and also consistent with other parts of the code. In addition, replacing printf with print on line 1188, yielded correct spectra.
Regarding perl idioms, I am still rather new to the game of programming with perl and am slowly finding my feet. However, I still very much have fortran thought processes!
Again, many thanks for your response and for your suggestions.
Steve
|
|---|