这是我把帮助里的例子(我稍微改了一下):
REAL Buf1[10]=0,3,4,9,10,8,7,6,8,10;
REAL Buf2[10]=3,2,5,8,9,3,9,6,6,10;
REAL Buf3[10]=9,10,3,5,8,4,3,7,10,1;
FUNCTION myplot
INT hPlot=PlotOpen(20,"DISPLAY",17);
IF hPlot <> -1 THEN
PlotGrid(hPlot,18,450,800,1850,1600,5,red,10,blue,4,black,white,0);
PlotLine(hPlot,0,green,3,6,green,2,10,Buf1,0,100,1);
PlotXYLine(hPlot,0,yellow,4,3,black,2,8,Buf2,0,150,Buf3,0,100,1);
PlotDraw(hPlot,1,0,black,1,grey,900,250,1400,400);
INT hFont = DspFont("Times",-60,black,grey);
PlotText(hPlot,hFont,0,950,350,"Citect Graph");
PlotClose(hPlot);
END
END
可是在编译的时候就报错了:
错误:Operand expected
PlotDraw(hPlot,1,0,black,1,grey,900,250,1400,400); {INT} hFont = DspFont("Times",-60,black,grey);
后来我把这两句报错的屏蔽了,运行后是空的,没有网格图和那两条直线,麻烦hujun帮忙看看?谢了
错误:Operand expected
PlotDraw(hPlot,1,0,black,1,grey,900,250,1400,400); {INT} hFont = DspFont("Times",-60,black,grey);
这个问题我已经知道原因了,是变量的定义要在函数的开始处
程序改好后,发现还是没有画出曲线,我就用单步调试,发现在运行到PlotClose(hPlot)这一句时就报错了:
错误272:DESC:'Out of memory'
errpage:'PlotClose'
errdesc:'myplot'
请问这是什么原因呢?