Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 283789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:24:12+00:00 2026-05-12T05:24:12+00:00

Before I begin, I must preface by stating that I am a novice when

  • 0

Before I begin, I must preface by stating that I am a novice when it comes to FORTRAN. I am maintaining a legacy piece of code from 1978. It’s purpose is to read in some data values from a file, process the values, and then output the processed values to another text file.

Given the following FORTRAN code:

      INTEGER NM,STUBS,I,J,K
      PARAMETER (NM=67,STUBS=43)
      INTEGER*4 MDS(STUBS,NM)

      CALL OPEN$A(A$RDWR,'/home/test/data.txt', MAXPATHLEN,1)
      CALL OPEN$A(A$WRIT,'out',11,2)

      DO 90 I=1,2
          READ(1,82) STUB     
          !-- data processing --!     
          WRITE(2,80) STUB,(MDS(I,J),J=1,24)
90    CONTINUE

80    FORMAT(/1X,A24,25I5)
82    FORMAT(1X,A24,25F5,1)

My question is in regards to the WRITE() statement.

I understand that (2,80) refers to the file output stream opened and pointing to the file 'out' and referenced by the numeral 2. I understand that 80 refers to the format statement referenced by label 80.

STUB is used to store the values read from file input 1. These values are what is processed, and saved into MDS(I,J) in the !-- data processing --! section that I have omitted.

Am I correct in assuming that (MDS(I,J),J=1,24) will write 24 integer values to the output file? In other words, looping from 1 to 24?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T05:24:12+00:00Added an answer on May 12, 2026 at 5:24 am

    Yes, you are correct. The syntax (MDS(I,J), J=1,24) is an “implied DO-loop” and is commonly used in situations like this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Before I jump headlong into C#... I've always felt that C, or maybe C++,
When creating menus with submenus in Visual C++, I find that submenus begin as
Good afternoon. Before I begin my explanation, I have had a look at other
Before I begin, my reason for not using OAuth is I believe it is
Before you answer this I have never developed anything popular enough to attain high
Before I start, I know there is this post and it doesn't answer my
Before I do this I figured I would ask if it was the best
Before, I have found the Cost in the execution plan to be a good
Before moving on to use SVN, I used to manage my project by simply
Before anyone suggests scrapping the table tags altogether, I'm just modifying this part of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.