INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
• 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.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# Simple question, yet I cannot figure it out. Please help!

 Forum Search FAQs Links MVPs

## Simple question, yet I cannot figure it out. Please help!

(OP)
In other life, I did a lot of Fortran programming. I needed to write a simple program to do something and, for the life of me, I can't get it to work. I've checked on-line, but to no avail.

What I show first is the simple source code. What I show next is the compilation error. I've scaled down the code to really focus in on the error, but I can't understand the compilation error.

program abc
implicit none

integer i,x(2)

do x(1)=1,2
end do

end program abc
-----------------------------------------

[t7600 test]\$ f95 inverse.for
inverse.for:6.6:

do x(1)=1,2
1
Error: Unclassifiable statement at (1)
inverse.for:8.9:

end do
1
Error: Expecting END PROGRAM statement at (1)
------------------------------------------

Anything someone can do to help here would be appreciated.

Thank you,

DV

### RE: Simple question, yet I cannot figure it out. Please help!

You tried to use array element x(1) as do-loop-variable. Use simply integer variable i and it will work:

#### CODE

program abc
implicit none

integer i,x(2)

do i=1,2
end do

end program abc 

### RE: Simple question, yet I cannot figure it out. Please help!

(OP)
Okay. I can figure it out from here. I didn't realize that using array elements were not allowed.

Thank you.

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

#### Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

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!