2 ms·
I realise that, although I'd have to say it's not exactly the way I would have handled the situation. In my experience, linking binary Fortran libraries against
by pmjordan 18y ago
I realise that, although I'd have to say it's not exactly the way I would have handled the situation. In my experience, linking binary Fortran libraries against C code doesn't lead to interfaces that expect such array pointers, and when porting Fortran code to C, I would have probably handled the index numbering issue with a macro for element access where converting to 0-based notation isn't completely foolproof.
Actually, I probably would have provided the numerical recipes code in two versions, one in the 1-based format, the other in idiomatic C.
But then I'm more of a software engineer than a computational physicist even though my degree certificate claims otherwise.