I'm busy with updating an old Fortran program (compiled with FTN95/win32 /Clearwin+/v 2.52). I made some changes to the original scripts so that I should be able to compile it with the 64 bits compiler. However I get an access violation message when compiling one of the scripts.
Runtime error from program:c:\program files (x86)\silverfrost\ftn95\ftn95.exe Access Violation The instruction at address 1004d45d attempted to read from location 0000001a
1004d3b3 __user_integer(<ref>(<ptr>char)) [+00aa]
100949ee do_format_code(<ref>(<ptr>char),<ref>(<ptr>char),int,int,int,enumÄlogical,enumÄ [+2bac]
100a3cf1 __winio [+0b11]
00566661 do_winio_check(<ptr>structÄtree_record)#77 [+04f5]
00566c73 amd_do_function(<ptr>structÄtree_record) [+00f7]
0055e44c AmdCodeGenerator(<ref>structÄtree_ptr) [+37ca]
00569712 amd_do_equals(<ptr>structÄtree_record) [+033b]
0055e44c AmdCodeGenerator(<ref>structÄtree_ptr) [+37ca] [recur= 1]
eax=0b8f8460 ebx=03d4e570 ecx=0000001a edx=00000042 esi=00000000 edi=03d4e534 ebp=03d4db20 esp=03d4dafc IOPL=0 ds=002b es=002b fs=0053 gs=002b cs=0023 ss=002b flgs=00210212 [NC OP NZ SN DN NV]
1004d45d mov eax,[ecx] 1004d45f jmp 1004d4c0 1004d464 jmp 1004d4c0
I tried to find what is going wrong and I think it has something to do with this part of a script, and then the last line.
integer function fbound()
!
use carray
use grey
use hipwin
use iarray
use isingle
implicit none
! Called functions
integer , external :: grddsp,fbclst,sav_name,bctest
integer , external :: fblft,fbcedt,fbcadd,fbcdel,fbcdsp,fbrit
integer , external :: fbfrt,fbbac,fbfpb,fball,fbcall,fblpr
if(nc2 == 20) then
gradd=0
else
gradd=1
endif
if(nc2 > 0) then
grbor=0
grdel=1
grdsp=1
gredt=1
else
grbor=1
grdel=0
grdsp=0
gredt=0
endif
ans=winio@('%ca[ Specified Flux Conduction Boundaries]&')
ans=winio@('%mi[hstinpicon]&')
ans=winio@('%ww[no_maxminbox]&')
ans=winio@('%sy[3d]&')
ans=winio@('%bg[Grey]%tc[Black]&')
ans=winio@('%mn[~&Edit]&',gredt,fbcedt)
gredt is defined in a module as integer :: gredt I can change it to integer*8, or integer (kind=9), but then I get the error code that gredt should be an integer....?
Any suggestions?