- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way in fortran to have your include statements on one line. THis is what I have.
[bash]$if def,selap,1 use scdmod ! implicit none include 'comctl.h' include 'comlst.h' include 'cons.h' include 'contrl.h' include 'genrl.h' include 'statec.h' include 'stcblk.h' include 'maxmem.h' include 'machls.h' include 'ufiles.h' include 'ufilef.h' include 'scddat.h' include 'cpmdat.h' include 'alcm.h' include 'balfar.h' include 'bcons.h' include 'bconds.h' include 'bder.h' include 'bln2wk.h' include 'blonab.h' include 'bloond.h' include 'bsize.h' include 'buntim.h' include 'bwcons.h' include 'bwgeom.h' include 'bwprop.h' include 'bwtrns.h' include 'cdfinc.h' include 'cdfinv.h' include 'cmatp.h' include 'cmptim.h' include 'cora.h' include 'coupl.h' include 'cprdat.h' include 'cprops.h' include 'dbacct.h' include 'dcon.h' include 'debcom.h' include 'debout.h' include 'effprp.h' include 'eht0.h' include 'ehtc0.h' include 'farays.h' include 'fecom.h' include 'fginvc.h' include 'fgrcom.h' include 'fplim.h' include 'fpbin.h' include 'fpcoef.h' include 'fpctrl.h' include 'fpdkht.h' include 'fpinsh.h' include 'fpmas.h' include 'fpmdl.h' $if def,selap,2 integer idlagg equivalence (idlagg,mdlagg) include 'fpnonv.h' include 'fpvol.h' include 'ftbfet.h' include 'grscgr.h' include 'grsparg.h' include 'grsprg.h' include 'hardpn.h' include 'hfuson.h' include 'intcom.h' include 'iocom.h' include 'iparm.h' include 'iparmm.h' include 'k3all.h' include 'k3point.h' include 'lvel.h' include 'madatc.h' include 'matdat.h' include 'matsrs.h' include 'miscon.h' include 'mxnfcd.h' include 'nbtim.h' include 'ndxara.h' include 'nhtara.h' include 'nrcom.h' include 'oxcom1.h' include 'oxcom2.h' include 'oxcom3.h' include 'oxcom4.h' include 'parm.h' include 'parmm.h' include 'plndat.h' include 'prdat.h' include 'ptscom.h' include 'radata.h' include 'rgacct.h' include 'rupt.h' include 'scdads.h' include 'scdcom.h' include 'scdout.h' include 'scntl.h' include 'slbcom.h' include 'slumpv.h' include 'solcom.h' include 'tblsp.h' include 'thplot.h' include 'trnot1.h' include 'trnot2.h' include 'uoxcom.h' include 'uphdpn.h' include 'scdpow.h' include 'axtrns.h' include 'bcs.h' include 'blageo.h' include 'blinit.h' include 'blkage.h' include 'cboilx.h' include 'cr2.h' include 'cvals.h' include 'noval.h' include 'za.h' include 'oldcom.h' include 'upccon.h' include 'upcvar.h'[/bash]
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Putting more than one statement in one line, separated by semicolons, is not allowed for include statements.
[bash]error #5134: An INCLUDE line may not contain other statements [/bash]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use a heiractical structure for your include statements, as it is a compiler directive. You can have anything in an include file, so long as the end result is a valid sequence of fortran statements.
I sometimes use include for grouping many source files, or even all the source files for a program to produce a simple compile and load syntax, controlling which versions of a routine are included in a .exe
John
I sometimes use include for grouping many source files, or even all the source files for a program to produce a simple compile and load syntax, controlling which versions of a routine are included in a .exe
John

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page