View previous topic :: View next topic |
Author |
Message |
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Fri Jul 02, 2021 7:03 am Post subject: Devilry? |
|
|
Abruptly within the same day when all was fine i started to get without any changes in the source code
Code: | integer*4 function cbChangePalette()
use clrwin
real*8 FofSizeIncr
common /ColorPalette1_/ FofSizeIncr, iCurrPalettePart, iCurrPaletteSol, kSizeProportToIntens
integer iCurrPaletteNo
common /ColorPalette0_/ iCurrPaletteNo
integer, external :: PrepareIntegerColorbarArray
jj=PrepareIntegerColorbarArray(iCurrPaletteNo) <---- debugger stopped here
cbChangePalette=1
end function |
Error: Attempt to call a subroutine as if it were a real(kind=1) function.
Subroutine ??? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Fri Jul 02, 2021 7:12 am Post subject: |
|
|
Dan
Can you provide a working sample that fails in this way.
The following reconstruction works OK for me with /checkmate (both 32 and 64 bits).
Code: | integer function PrepareIntegerColorbarArray(i)
PrepareIntegerColorbarArray = i
end function
integer*4 function cbChangePalette()
use clrwin
real*8 FofSizeIncr
common /ColorPalette1_/ FofSizeIncr, iCurrPalettePart, iCurrPaletteSol, kSizeProportToIntens
integer iCurrPaletteNo
common /ColorPalette0_/ iCurrPaletteNo
integer, external :: PrepareIntegerColorbarArray
iCurrPaletteNo = 1
jj=PrepareIntegerColorbarArray(iCurrPaletteNo)
cbChangePalette=1
end function
program main
integer, external:: cbchangepalette
integer i
i = cbchangepalette()
end program main |
|
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Thu Jul 08, 2021 9:03 am Post subject: |
|
|
I failed to find the reason for several days...Really tricky thing happened. I collected this bad code but the debug will require long search of affected part.
Just rewrote this part of the code including all affected related functions and subroutines into the large main module. Now it will be harder to take it out to another code if needed |
|
Back to top |
|
|
|