Sometimes it's all about the aesthetics.

10/12/2009

The necessity to write a namelist driver in C.

Okay, I am going to read into libi77 for more information:

"There is no C or C++ equivalent of Fortran list-directed I/O (READ (unit,*) io-list, WRITE (unit,*) io-list), or of Fortran NAMELIST I/O (READ (unit,namelist-name), WRITE (unit,namelist-name)). Avoid those Fortran features if you expect to process such files with programs written in other programming languages." - http://www.math.utah.edu/software/c-with-fortran.html

8 comments:

artyx said...

Not really. Complicated operator/functor for container classes can do that in similar ways. In that case you'll need to write own data type classes or reuse what's provided in numeric libraries so that it's doable.

Mengjuei Hsieh said...

That's what libf2c/libi77 does. My concern was the question whether I should do my own one, or just figure out libf2c's interface.

artyx said...

You'd better use theirs. Not everyone's having that much time dealing crappy syntactic poisons of C++ template/overloading/polymorphism.

barabbas said...
This comment has been removed by the author.
barabbas said...

Be aware that C++ for_each() with functor could be too complicated to maintain. Sometimes do you code self in much sillier way may save you and your successors.

Leave modern C++0x for better for_each()/transform() and functor and blahblah to 2012, it Earth is still here. :p

珍雅 said...
This comment has been removed by a blog administrator.
Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...
This comment has been removed by a blog administrator.