I need to use pointers in procedures (from where imported functions are called) and do not want to pass them as parameters, but instead have access to them as global.
It works fine as long as I have the call for the imported function in the main program, but when I move the same to a procedure problem occur.
I have the following code:
Code: Select all
;-------------------------------------------------
Import "calc32.lib"
julday (a.l, b.l, c.l, d.d, e.l, f.l=0) As "_julday@24"
EndImport
Prototype.d FunctionA (a.l, b.l, c.l, d.d, e.l, f.l=1)
*PointerA.FunctionA=@julday()
;-------------------------------------------------
juliandayUT.d=*PointerA (year.l, month.l, day.l, time.d, flag.l)
;---------------------------------------------------Code: Select all
;---------------------------
Global *PointerA.FunctionA=@julday()
;--------------------------Code: Select all
;----------------------------------------
Procedure Procedure JulianDate()
juliandayUT.d=*PointerA (year.l, month.l, day.l, time.d, gregflag.l)
EndProcedure
;---------------------------------------------------Code: Select all
;--------------------------------------
JulianDate()
;------------------------------------So I assumes that there's some problem with the pointer here. Can anyone explain the reason for this problem and how it should be solved?


