Author |
Message |
Topic: Need help! error 363 and 773 |
star2066
Replies: 7
Views: 10743
|
Forum: Support Posted: Wed Mar 25, 2015 7:37 pm Subject: Re: |
You can do use an internal write to form the file name, and then open the file with that name.
character(len=8) :: filename
...
write(filename,'(i2,",",i1,".t ... |
Topic: Need help! error 363 and 773 |
star2066
Replies: 7
Views: 10743
|
Forum: Support Posted: Wed Mar 25, 2015 6:38 pm Subject: Re: |
You do not need a DO loop to find the largest value of ngamma such that its square does not exceed the sum of n1 and n2. It would be enough to write
print *,'gamma_n can be <= ', int(sqrt( ... |
Topic: How to make done variable getting reset between the runs? |
star2066
Replies: 2
Views: 4831
|
Forum: Support Posted: Wed Mar 25, 2015 4:19 pm Subject: |
I use a "stupid" way to do it . Setting every variable = 0 before the main program. Is there a simple way to do it? |
Topic: How to make done variable getting reset between the runs? |
star2066
Replies: 2
Views: 4831
|
Forum: Support Posted: Wed Mar 25, 2015 4:10 pm Subject: How to make done variable getting reset between the runs? |
I want to repeat my main program 1000 times. Unfortunately, only few results is what I want. But if I do it one by one by hand. It's all right. I have almost 20 variable need to be reseted. |
Topic: Need help! error 363 and 773 |
star2066
Replies: 7
Views: 10743
|
Forum: Support Posted: Tue Mar 24, 2015 4:26 pm Subject: Re: |
You do not need a DO loop to find the largest value of ngamma such that its square does not exceed the sum of n1 and n2. It would be enough to write
print *,'gamma_n can be <= ', int(sqrt( ... |
Topic: Need help! error 363 and 773 |
star2066
Replies: 7
Views: 10743
|
Forum: Support Posted: Mon Mar 23, 2015 2:37 pm Subject: Re: |
Is this what you wanted to do ?program test
implicit none
real :: ngamma,n1,n2
n1=5
n2=5
ngamma=0
do
ngamma=ngamma+1
if ( sqrt(n1+n2) >= ngamma ) ... |
Topic: Need help! error 363 and 773 |
star2066
Replies: 7
Views: 10743
|
Forum: Support Posted: Mon Mar 23, 2015 5:46 am Subject: Need help! error 363 and 773 |
program test
implicit none
real :: ngamma,n1,n2
n1=5
n2=5
ngamma=0
if (sqrt(n1+n2)>=ngamma)
then ngamma=ngamma+1
endif
print *,'gamma_n can be',ngamma
end pr ... |
Topic: Unknow Problem |
star2066
Replies: 3
Views: 5131
|
Forum: Support Posted: Wed Feb 25, 2015 7:14 pm Subject: Unknow Problem |
[img]https://fbcdn-sphotos-a-a.akamaihd.net/hphotos-ak-xfp1/v/t1.0-9/11001814_638960049563637_6646211210121526787_n.jpg?oh=7edcaa3e6b8625e41b793152307c7d76&oe=557D38B6&__gda__=1434111551_ce93f ... |
Topic: Run-time Error 11 |
star2066
Replies: 20
Views: 22475
|
Forum: Support Posted: Thu Jan 29, 2015 12:28 am Subject: Re: |
You may not be aware that FTN95 comes with a subroutine, RSORT@, for creating a rank index array for a real array. Using that subroutine, your program can be abbreviated to
program test
... |
Topic: Run-time Error 11 |
star2066
Replies: 20
Views: 22475
|
Forum: Support Posted: Wed Jan 28, 2015 5:13 am Subject: Re: |
Star2066: Old code such as the one that you posted, with dummy argument arrays with declared size of (1), as in your subroutine RANK, will not behave properly when you use a checking option such as /C ... |
Topic: Run-time Error 11 |
star2066
Replies: 20
Views: 22475
|
Forum: Support Posted: Wed Jan 28, 2015 5:11 am Subject: Re: |
With two changes, your program runs fine with /check. The first is to replace (1) by (N) in the DIMENSION statement in subroutine RANK; the second is to replace ( (darn smileys; that was left-paren ... |
Topic: Run-time Error 11 |
star2066
Replies: 20
Views: 22475
|
Forum: Support Posted: Wed Jan 28, 2015 5:10 am Subject: Re: |
With two changes, your program runs fine with /check. The first is to replace (1) by (N) in the DIMENSION statement in subroutine RANK; the second is to replace ( (darn smileys; that was left-paren ... |
Topic: Run-time Error 11 |
star2066
Replies: 20
Views: 22475
|
Forum: Support Posted: Tue Jan 27, 2015 6:39 pm Subject: Re: |
We would need to see the whole of the main program.
That is where the value of n is set and it is this value that appears to be too large.
program test
implicit none
real :: r1,r2,c1,c ... |
Topic: Run-time Error 11 |
star2066
Replies: 20
Views: 22475
|
Forum: Support Posted: Tue Jan 27, 2015 5:55 pm Subject: Re: |
And, if the program is long and you feel that creating a short example with the same problematic behavior would take more effort than you are willing to provide, please zip up the whole program (sourc ... |
Topic: Run-time Error 11 |
star2066
Replies: 20
Views: 22475
|
Forum: Support Posted: Tue Jan 27, 2015 5:52 pm Subject: Re: |
If the program is short then you could post it here so that we can see the lines of code that are causing the problem.
Thank you for your reply, my code is on above |
|