由于VJ(SE,95)到V8的变化较大,大部分V8以前的MDL程序需要作相应的改动,本文将对文件扫描这一问题进行讨论。下面是升级后的一段代码: 
….. 
pPoint->x=3020435529.5423102, 
pPoint->y=2645572566.3975053. 
lRangeUors=10000; 
#if defined (V8) 
> 
> RscanList.xlowlim = (long)(pPoint->x - ); 
> RscanList.ylowlim = (long)(pPoint->y - lRangeUors); 
> RscanList.zlowlim = (long)(pPoint->z - lRangeUors); 
> RscanList.xhighlim = (long)(pPoint->x + lRangeUors); 
> RscanList.yhighlim = (long)(pPoint->y + lRangeUors); 
> RscanList.zhighlim = (long)(pPoint->z + lRangeUors); 
> 
> #else 
> RscanList.xlowlim = mdlCnv_toScanFormat((long) pPoint->x - 
lRangeUors); 
> RscanList.ylowlim = mdlCnv_toScanFormat((long) pPoint->y - 
lRangeUors); 
> RscanList.zlowlim = mdlCnv_toScanFormat((long) pPoint->z - 
lRangeUors); 
> RscanList.xhighlim = mdlCnv_toScanFormat((long) pPoint->x + 
lRangeUors); 
> RscanList.yhighlim = mdlCnv_toScanFormat((long) pPoint->y + 
lRangeUors); 
> RscanList.zhighlim = mdlCnv_toScanFormat((long) pPoint->z + 
lRangeUors); 
> #endif 
……. 
可是程序在V8下运行时范围限制部起作用,这是为什么呢?察看一下RscanList结构的定义就知道了,原V7以前的版本xlowlim采用的时是32bit,而V8采用的时是64bit(int64),所以强制转换成long是不行的,应该转换为 
int64. 
另外,V8也提供了相应的函数使用起来特别方便,请参阅帮助文档。例如: mdlCnv_dRange3dToScanRange ,mdlCnv_dRangeToScanRange 等等。