LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-15-2014, 09:09 PM   #1
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

Rep: Reputation: Disabled
What does it mean in GFortran?


I am seeing such expressions:

Code:
FAC(3:NF+2)
What does the colon do? why is it there? Thanks, - A.
 
Old 12-15-2014, 09:17 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

you haven't given any context to I'll guess that it's an array operation in fortran 90.

Evo2.
 
Old 12-16-2014, 09:37 AM   #3
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

Original Poster
Rep: Reputation: Disabled
Thanks. What do you mean a context? This line is a part of a very large package in Fortran on Fast fourier Transform. I cannot access the code now, only in about 12 hours. But even when I do what other informarion do you want? For a person familar with GFortran or any contemporary variant like Fortran 2008, etc, it should be self-explainatory.

BTW, this code is not a part of a declaration.

Last edited by AlexBB; 12-16-2014 at 09:41 AM.
 
Old 12-16-2014, 11:03 AM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
It's just referencing a certain index range in FAC.

Say NF is 5, it would be pulling out indices 3,4,5,6,7 from the array FAC.
 
1 members found this post helpful.
Old 12-16-2014, 05:00 PM   #5
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

Original Poster
Rep: Reputation: Disabled
suicidaleggroll is again on top of the game. Thanks.
 
Old 12-16-2014, 07:52 PM   #6
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
HI,
Quote:
Originally Posted by AlexBB View Post
Thanks. What do you mean a context?
It wasn't even a full line of code. The colon gave the hint that FAC was an array, but you didn't even bother to tell us that. Furthermore, you could have looked this up in less time than it took you to write your post.
Quote:
Originally Posted by AlexBB View Post
This line is a part of a very large package in Fortran on Fast fourier Transform.
That is context too. FFT, would hint towards dealing with arrays.

Quote:
Originally Posted by AlexBB View Post
I cannot access the code now, only in about 12 hours. But even when I do what other informarion do you want? For a person familar with GFortran or any contemporary variant like Fortran 2008, etc, it should be self-explainatory.
Really? Since you are clearly not, it seems very niave to assert that.

Evo2.
 
Old 12-16-2014, 09:11 PM   #7
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

Original Poster
Rep: Reputation: Disabled
Of course, I am learning. I write code and learn at the same time. Many programs can be written without sophisticated statements new Fortran variants offer. I programmed in Fortran IV years ago ad nauseum. I do not try to hide anything intentionally. I thought that posting a snippet will make your job easier. Now I fully understand what it meant. Still posting here is better than googling and reading although I do both. I also have another, similar question to ask. Will make a separate thread. I did not assert that I am an expert. You did not read my post attentively. I meant people like suicidaleggroll for instance.

This snippet actually appears only once in a comment, nowhere else. Here it is:

Quote:
! Output, real ( kind = 8 ) FAC(15), factorization information.
! FAC(1) is N, FAC(2) is NF, the number of factors, and FAC(3:NF+2) are the
! factors.

Last edited by AlexBB; 12-16-2014 at 09:14 PM.
 
Old 12-16-2014, 09:28 PM   #8
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,
Quote:
Originally Posted by AlexBB View Post
You did not read my post attentively.
You're welcome.

Plonk.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] What does it mean in GFortran? AlexBB Linux - Newbie 4 12-13-2014 01:43 PM
[SOLVED] cuda for gfortran ? aihaike Programming 4 09-26-2010 09:07 PM
gfortran for suse elnaz Linux - Newbie 2 11-07-2009 05:18 PM
help gfortran mperez Programming 2 12-16-2007 01:50 PM
gfortran and pgf90 peeInMyPantz Programming 1 08-08-2005 05:54 AM


All times are GMT -5. The time now is 02:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration