Precision problem ???

Q&A for Visual Basic, Visual Basic .NET, and PowerBasic developers using DPlot

Moderator: DPlotAdmin

Post Reply
shashank
Posts: 2
Joined: Sun Jun 20, 2004 6:43 pm

Precision problem ???

Post 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
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post 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).
Visualize Your Data
support@dplot.com
shashank
Posts: 2
Joined: Sun Jun 20, 2004 6:43 pm

Post by shashank »

thanks.that works.

shashank
Post Reply