Clicky

Fortran Wiki
Generic programming (Rev #4, changes)

Skip the Navigation Links | Home Page | All Pages | Recently Revised | Authors | Feeds | Export |

Showing changes from revision #3 to #4: (追記) Added (追記ここまで) | (削除) Removed (削除ここまで) | (削除) Chan (削除ここまで)(追記) ged (追記ここまで)

Generic programming is a method for reusing a single piece in different contexts, such as with multiple data types. For example, the main body of a single numerical procedure can be reused for both single and double precision real variables or the code for a linked list can be reused for lists of integers, reals, or strings.

Generic programming is not available in Fortran 95 and it is only available in the form of parametrized user-defined types in Fortran 2003. However, the use of a preprocessor can assist with generic programming.

Examples

See McGavin and Young (2001) and FLIBS for generic linked list implementations.

James Van Buskirk has written a generic version of BLAS available here: http://home.comcast.net/~kmbtib/Fortran_stuff/GENERIC_BLAS.ZIP

See Also

References

Revision from September 15, 2009 23:18:45 by Jason Blevins
Forward in time (2 more) | Back in time (3 more) | See current | Hide changes | History | Rollback | View: Source | Linked from: HomePage, Code, 2009, Linked list, FLIBS, Hash tables, Forpedo, Preprocessors, gen_list, hash table example

AltStyle によって変換されたページ (->オリジナル) /