Page 1 of 1

Precision problem ???

Posted: Sun Jun 20, 2004 6:50 pm
by shashank
I'm calling DPLOTLIB functions as ret = DPlot_Plot(d, x(0), y(0), cmds) from my vb program.

The problem is I need to plot date and time on X axis. But the interface only allows SINGLE but for time part I need to send double.

e.g. for Jan 15 2004 + time component, I need to send 38001.583 but I cannot send this number using Single.

Am I doing something wrong here? If not is there a work around?

thanks a llot
shashank

Posted: Sun Jun 20, 2004 10:09 pm
by DPlotAdmin
I recently added double-precision versions of all the functions that take data array arguments. See the readme.pdf included with the DLL. None of the VB examples call those functions, but there isn't much to it. You want

ret = DPlot_Plot8(d, x(0), y(0), cmds)

where x and y are declared as Double. You'll also need to add

Declare Function DPlot_Plot8 Lib "dplotlib" (ByRef d As DPLOT, ByRef x As Double, ByRef y As Double, ByVal cmds As String) As Long

in a public module (in the DPLOTLIB VB examples the DPLOTLIB declarations are in GLOBAL.BAS, which is as good a place as any).

Posted: Tue Jun 22, 2004 9:01 pm
by shashank
thanks.that works.

shashank