Smart questions
Smart people
 Find A ForumFind An Expert
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Remember Me

Are you a
Computer / IT professional?
Join Tek-Tips now!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Just copy and paste the

#### Feedback

"...This site is awesome!...Things I have been trying to figure out for weeks, I got the answer in hours!..."

#### Geography

Where in the world do Tek-Tips members come from?

# print specific values of array(2)

 Forum Search FAQs Links Jobs Whitepapers MVPs
 ellipm (Programmer) 10 May 12 18:06

Hi,
I have an enormous amount of results to print and i'm wondering if there's a way to print them every 100 steps for example. i'm trying to do it that way

#### CODE --> fortran

DO I=1,NI,100
DO J=1,NJ
WRITE(2,200) DS(I),S(I),U(I,J)
enddo
ENDDO

but i didn't make any progress so far. I'm not sure that there's such a possibility in fortran.

 xwb (Programmer) 10 May 12 18:11
 Anything is possible. Your little snippet will print every 100th row of U but it depends on the values of NI and NJ. You could still produce large amounts of output if NJ is large.
 ellipm (Programmer) 10 May 12 18:17
 NJ isn't large. nj=30. NI is 10000.But it seems that my way doesn't work out. I have every i step printed!!
 salgerman (Programmer) 10 May 12 22:23

Is this exactly the code as you are using it? or
are you simplifying stuff and THEN posting?

By the way, I am not sure I would have written the inner loop like that, I would have

#### CODE

DO I=1,NI,100
write(2,*) DS(I),S(I),(U(I,J),J=1,NJ)
ENDDO

 xwb (Programmer) 11 May 12 0:15
 Well spotted salgerman.ellipm what you're seeing is 30 lines for every 100th line. What does FORMAT 200 look like?
 gummibaer (Programmer) 11 May 12 5:15
 Just my impression:I would not be too happy to have only one percent of the results presented to me, Murphy's law has it, that the interesting part of your results will be in the other 99 % of your data.What about graphics ?This link http://fortranwiki.org/fortran/show/Libraries gives (among others) a list of fortran graphic packages that may be helpful to display a lot of data. Norbert The optimist believes we live in the best of all possible worlds - the pessimist fears this might be true.
 xwb (Programmer) 11 May 12 17:58
 If you are using ifort (IVF), there is a graphical array viewer that comes with it.

Close Box

# Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!