Sub GetHoldByCode(sAccount,sCode,sMarket)
dim i
dim BuyHolding
dim BuyCost
dim BuyTodayHolding
dim SellHolding
dim SellCost
dim SellTodayHolding
dim PNL
dim UseMargin
dim Code
dim Market
On Error resume Next
AccountStatus=Order.Account2(2,sAccount) '检测账户是否登陆,如果没有登陆就退出
'application.MsgOut sCode & "," & sMarket & "," & sAccount & ",NextCode:" & NextCode & ",账户状态:" & AccountStatus
if AccountStatus=255 Or AccountStatus="" then
exit sub
end if
Call Order.HoldingInfoByCode2(sCode,sMarket,BuyHolding,BuyCost,BuyTodayHolding,SellHolding,SellCost,SellTodayHolding,PNL,UseMargin,sAccount)
BuyHold=BuyHolding
SellHold=SellHolding
End Sub
这段代码是用来查账户持仓的,请问,若账户没有持仓,那BuyHold的值是0,还是为空。若为空值,如何转为0