2014-06-26 16:08 GMT+08:00 Piotr Caban <piotr.caban@gmail.com>:
On 06/26/14 06:05, Shuai Meng wrote:
Hi,
I notice that Abs(Null) should return Null according to
http://msdn.microsoft.com/en-us/library/307330xe(v=vs.84).aspx

In wine source code, NULL is defined as 0 in
file dlls/windowscodecs/ungif.h, line 66. I have tried to write like this:
1260 ������ ������ if(V_VT(arg) == VT_NULL) {
1261 ������ ������ ������ ������ V_VT(res) = VT_NULL;
1262 ������ ������ ������ ������ V_NULL(res) = NULL;
1263 ������ ������ }
In case of VT_NULL variant type there's no need to set variant value. You only need to set V_VT(res) to VT_NULL.
Thank you Piotr. I get it.
You also need to handle res==NULL case here.
I guess you mean that I need to handle res==NULL case in branch if(V_VT(arg) == VT_NULL), right?������
������
There is another problem: though Abs(Null) should return Null according to
http://msdn.microsoft.com/en-us/library/307330xe(v=vs.84).aspx������, but I test it in WINXP,������i.e.������������when arg == Null,������the vbscript code:
Call Abs(Null)������
and
dim b
b = Abs(Null)
MsgBox b
������returns an error.