forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

INCLUDE meaning

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
christyleomin



Joined: 08 Apr 2011
Posts: 155

PostPosted: Fri Jul 01, 2011 6:38 am    Post subject: INCLUDE meaning Reply with quote

I have been going through another person's (who is currently not accesable for me) code of Fortran 77 and am relatively new to Fortran.

He uses a keyword "INCLUDE' whilst declaring variables, like include something.inc.

What does it indicate?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7926
Location: Salford, UK

PostPosted: Fri Jul 01, 2011 7:44 am    Post subject: Reply with quote

It describes another file that is to be inserted into the code at that point.
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Fri Jul 01, 2011 4:52 pm    Post subject: Reply with quote

... and there's another bit of valuable knowledge. In FTN95, enclosing the filename in "diamond brackets" means "go and look for it in FTN95's folders", e.g

Code:
      INCLUDE <WINDOWS.INS>


(although this is non-standard), whereas if the filename is treated as a literal, e.g.

Code:
      INCLUDE 'C:\PROGRAM\something.inc'


then that tells the compiler where to look (or if a path isn't given, look in the working folder).

The relevant bit in FTN95's help file describes INCLUDE as a "compiler directive", and notes that it can occur anywhere in source code, including in an INCLUDE file, nesting up to 10 deep.

Eddie
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group