LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 08:09 PM   #1
AlexBB
Member
 
Registered: Mar 2014
Posts: 464

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, 08:17 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
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, 08:37 AM   #3
AlexBB
Member
 
Registered: Mar 2014
Posts: 464

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 08:41 AM.
 
Old 12-16-2014, 10:03 AM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
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, 04:00 PM   #5
AlexBB
Member
 
Registered: Mar 2014
Posts: 464

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

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
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, 08:11 PM   #7
AlexBB
Member
 
Registered: Mar 2014
Posts: 464

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 08:14 PM.
 
Old 12-16-2014, 08:28 PM   #8
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

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

Plonk.
 
  


Reply



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 12:43 PM
[SOLVED] cuda for gfortran ? aihaike Programming 4 09-26-2010 08:07 PM
gfortran for suse elnaz Linux - Newbie 2 11-07-2009 04:18 PM
help gfortran mperez Programming 2 12-16-2007 12:50 PM
gfortran and pgf90 peeInMyPantz Programming 1 08-08-2005 04:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:16 AM.

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
Open Source Consulting | Domain Registration