Silverfrost Forums

Welcome to our forums

Devilry?

2 Jul 2021 6:03 #28030

Abruptly within the same day when all was fine i started to get without any changes in the source 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 ???

2 Jul 2021 6:12 #28031

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).

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
8 Jul 2021 8:03 #28060

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

Please login to reply.