<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2014-06-26 16:08 GMT+08:00 Piotr Caban <span dir="ltr"><<a href="mailto:piotr.caban@gmail.com" target="_blank">piotr.caban@gmail.com</a>></span>:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="">On 06/26/14 06:05, Shuai Meng wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hi,<br>
I notice that Abs(Null) should return Null according to<br>
<a href="http://msdn.microsoft.com/en-us/library/307330xe(v=vs.84).aspx" target="_blank">http://msdn.microsoft.com/en-<u></u>us/library/307330xe(v=vs.84).<u></u>aspx</a><br>
<br>
In wine source code, NULL is defined as 0 in<br>
file dlls/windowscodecs/ungif.h, line 66. I have tried to write like this:<br>
1260     if(V_VT(arg) == VT_NULL) {<br>
1261         V_VT(res) = VT_NULL;<br>
1262         V_NULL(res) = NULL;<br>
1263     }<br>
</blockquote></div>
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. </blockquote><div>Thank you Piotr. I get it.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

You also need to handle res==NULL case here.<br>
</blockquote></div>I guess you mean that I need to handle res==NULL case in branch if(V_VT(arg) == VT_NULL), right? </div><div class="gmail_extra"> </div><div class="gmail_extra">There is another problem: though Abs(Null) should return Null according to</div>

<a href="http://msdn.microsoft.com/en-us/library/307330xe(v=vs.84).aspx" target="_blank">http://msdn.microsoft.com/en-<u></u>us/library/307330xe(v=vs.84).<u></u>aspx</a> , but I test it in WINXP, i.e.  when arg == Null, the vbscript code:<div>

Call Abs(Null) </div><div>and</div><div><div>dim b</div><div>b = Abs(Null)</div><div>MsgBox b</div></div><div> returns an error.</div><div><br></div></div>