allocation error
- From: "lane straatman" <grumpy196884@xxxxxxxxxxx>
- Date: 29 Dec 2006 09:31:41 -0800
program pascal1
IMPLICIT NONE
integer :: n, i
integer, dimension(:), allocatable :: pascal
allocate(pascal(1:n))
write (*,'(a)', advance='no') 'give me an int'
read (*, '(i3)') n
do i=1, n
pascal(n) = i
write (*, '(i3)') pascal(i)
end do
end program pascal1
This program wants to dynamically allocate an array of rank 1. It
compiles and builds but has the following bug:
Run-time Error
*** Error 112, Reference to undefined variable, array element or
function result (/UNDEF)
PASCAL1 - in file pascal1.f95 at line 5 [+004e]
Ideas? LS
.
- Follow-Ups:
- Re: allocation error
- From: robin
- Re: allocation error
- From: Richard Maine
- Re: allocation error
- Prev by Date: Re: flop counter
- Next by Date: Re: allocation error
- Previous by thread: flop counter
- Next by thread: Re: allocation error
- Index(es):
Relevant Pages
|
|