<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Quiz: Find the difference between these VBScript codes?</title> <atom:link href="http://www.learnqtp.com/difference-between-numeric-boolean-string-comparison-qtp/feed/" rel="self" type="application/rss+xml" /><link>http://www.learnqtp.com/difference-between-numeric-boolean-string-comparison-qtp/</link> <description></description> <lastBuildDate>Tue, 31 Jan 2012 08:17:01 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /> <item><title>By: Koteswara Rao</title><link>http://www.learnqtp.com/difference-between-numeric-boolean-string-comparison-qtp/comment-page-1/#comment-19191</link> <dc:creator>Koteswara Rao</dc:creator> <pubDate>Thu, 29 Sep 2011 09:03:45 +0000</pubDate> <guid
isPermaLink="false">http://www.learnqtp.com/difference-between-numeric-boolean-string-comparison-qtp/#comment-19191</guid> <description>If Browser(“Browser”).Page(“Page”).Link(“Link”).Exist(0)=”True”,  this statement is wrong because Exist(0) is not a method to return value, after all this is a property. so any property doesn&#039;t return any value. But this statement is trying to compare with &quot;True&quot; string with the return value. So it through error.
Where as in the second statement return value not taken. so it doesn&#039;t give any runtime error.</description> <content:encoded><![CDATA[<p>If Browser(“Browser”).Page(“Page”).Link(“Link”).Exist(0)=”True”,  this statement is wrong because Exist(0) is not a method to return value, after all this is a property. so any property doesn&#8217;t return any value. But this statement is trying to compare with &#8220;True&#8221; string with the return value. So it through error.<br
/> Where as in the second statement return value not taken. so it doesn&#8217;t give any runtime error.</p> ]]></content:encoded> </item> <item><title>By: Ramakrishna</title><link>http://www.learnqtp.com/difference-between-numeric-boolean-string-comparison-qtp/comment-page-1/#comment-5835</link> <dc:creator>Ramakrishna</dc:creator> <pubDate>Tue, 08 Dec 2009 11:44:49 +0000</pubDate> <guid
isPermaLink="false">http://www.learnqtp.com/difference-between-numeric-boolean-string-comparison-qtp/#comment-5835</guid> <description>Hi,
first one is comparing true=true then only it will return yes
second one if true then it will return yes</description> <content:encoded><![CDATA[<p>Hi,</p><p>first one is comparing true=true then only it will return yes</p><p>second one if true then it will return yes</p> ]]></content:encoded> </item> <item><title>By: madhu</title><link>http://www.learnqtp.com/difference-between-numeric-boolean-string-comparison-qtp/comment-page-1/#comment-538</link> <dc:creator>madhu</dc:creator> <pubDate>Tue, 03 Mar 2009 05:11:44 +0000</pubDate> <guid
isPermaLink="false">http://www.learnqtp.com/difference-between-numeric-boolean-string-comparison-qtp/#comment-538</guid> <description>in that case no need to use equqlity operator and  boolean values.
why because the Exist function returns boolean value.
Exist(0) : if already object is exists
Exist(5) : tool will wait for 5 sec and then it will return boolean value</description> <content:encoded><![CDATA[<p>in that case no need to use equqlity operator and  boolean values.<br
/> why because the Exist function returns boolean value.<br
/> Exist(0) : if already object is exists<br
/> Exist(5) : tool will wait for 5 sec and then it will return boolean value</p> ]]></content:encoded> </item> <item><title>By: Rick Hall</title><link>http://www.learnqtp.com/difference-between-numeric-boolean-string-comparison-qtp/comment-page-1/#comment-371</link> <dc:creator>Rick Hall</dc:creator> <pubDate>Tue, 03 Feb 2009 14:54:58 +0000</pubDate> <guid
isPermaLink="false">http://www.learnqtp.com/difference-between-numeric-boolean-string-comparison-qtp/#comment-371</guid> <description>&gt; Can you find a problem with the 1st piece of code?
The  true &quot;flaw&quot; is the limitation in the (=) operator in VBScript .
(Equals to operator (=) compares string or numeric expressions.)
Now VBScript is forced to do implicit conversions of the boolean factors in the expression.
If boolean factors were compared innately then this conundrum would not exist.</description> <content:encoded><![CDATA[<p>&gt; Can you find a problem with the 1st piece of code?</p><p>The  true &#8220;flaw&#8221; is the limitation in the (=) operator in VBScript .<br
/> (Equals to operator (=) compares string or numeric expressions.)</p><p>Now VBScript is forced to do implicit conversions of the boolean factors in the expression.</p><p>If boolean factors were compared innately then this conundrum would not exist.</p> ]]></content:encoded> </item> <item><title>By: kiran</title><link>http://www.learnqtp.com/difference-between-numeric-boolean-string-comparison-qtp/comment-page-1/#comment-369</link> <dc:creator>kiran</dc:creator> <pubDate>Tue, 03 Feb 2009 11:47:57 +0000</pubDate> <guid
isPermaLink="false">http://www.learnqtp.com/difference-between-numeric-boolean-string-comparison-qtp/#comment-369</guid> <description>There is no difference in above two statements, when you use a boolean, execution will get faster since its only depend on  quick response of the boolean and also there will be no wating</description> <content:encoded><![CDATA[<p>There is no difference in above two statements, when you use a boolean, execution will get faster since its only depend on  quick response of the boolean and also there will be no wating</p> ]]></content:encoded> </item> <item><title>By: Tarun</title><link>http://www.learnqtp.com/difference-between-numeric-boolean-string-comparison-qtp/comment-page-1/#comment-362</link> <dc:creator>Tarun</dc:creator> <pubDate>Mon, 02 Feb 2009 16:23:23 +0000</pubDate> <guid
isPermaLink="false">http://www.learnqtp.com/difference-between-numeric-boolean-string-comparison-qtp/#comment-362</guid> <description>Here is a detailed explanation on the issue
http://knowledgeinbox.com/articles/qtp/object-identification/why-objectexist-true-returns-false-when-object-exists/</description> <content:encoded><![CDATA[<p>Here is a detailed explanation on the issue</p><p><a
href="http://knowledgeinbox.com/articles/qtp/object-identification/why-objectexist-true-returns-false-when-object-exists/" rel="nofollow">http://knowledgeinbox.com/articles/qtp/object-identification/why-objectexist-true-returns-false-when-object-exists/</a></p> ]]></content:encoded> </item> <item><title>By: ramu</title><link>http://www.learnqtp.com/difference-between-numeric-boolean-string-comparison-qtp/comment-page-1/#comment-358</link> <dc:creator>ramu</dc:creator> <pubDate>Mon, 02 Feb 2009 07:57:18 +0000</pubDate> <guid
isPermaLink="false">http://www.learnqtp.com/difference-between-numeric-boolean-string-comparison-qtp/#comment-358</guid> <description>In fact Exist statement will return BOOLEAN VALUE.That means it will return either 1 or 0
I appreciate if you suggest me the right way
--Ramu</description> <content:encoded><![CDATA[<p>In fact Exist statement will return BOOLEAN VALUE.That means it will return either 1 or 0</p><p>I appreciate if you suggest me the right way<br
/> &#8211;Ramu</p> ]]></content:encoded> </item> <item><title>By: ramu</title><link>http://www.learnqtp.com/difference-between-numeric-boolean-string-comparison-qtp/comment-page-1/#comment-357</link> <dc:creator>ramu</dc:creator> <pubDate>Mon, 02 Feb 2009 07:55:09 +0000</pubDate> <guid
isPermaLink="false">http://www.learnqtp.com/difference-between-numeric-boolean-string-comparison-qtp/#comment-357</guid> <description>If Browser(&quot;Browser&quot;).Page(&quot;Page&quot;).Link(&quot;Link&quot;).Exist(0)=1 Then
Reporter.ReportEvent micPass &quot;Link Found&quot;, &quot;YES&quot;
End If
just try the above code.It will pass the statement
According to the syntax of the Exist statement, it will return either 1 (True) or 0 (False) . So if you compare with TRUE, it is going in else statement.
--Ramu</description> <content:encoded><![CDATA[<p>If Browser(&#8220;Browser&#8221;).Page(&#8220;Page&#8221;).Link(&#8220;Link&#8221;).Exist(0)=1 Then<br
/> Reporter.ReportEvent micPass &#8220;Link Found&#8221;, &#8220;YES&#8221;<br
/> End If</p><p>just try the above code.It will pass the statement<br
/> According to the syntax of the Exist statement, it will return either 1 (True) or 0 (False) . So if you compare with TRUE, it is going in else statement.</p><p>&#8211;Ramu</p> ]]></content:encoded> </item> <item><title>By: ramu</title><link>http://www.learnqtp.com/difference-between-numeric-boolean-string-comparison-qtp/comment-page-1/#comment-356</link> <dc:creator>ramu</dc:creator> <pubDate>Mon, 02 Feb 2009 07:43:02 +0000</pubDate> <guid
isPermaLink="false">http://www.learnqtp.com/difference-between-numeric-boolean-string-comparison-qtp/#comment-356</guid> <description>I just tried by keeping TRUE in double quotations  then it has executed True conditon statement. i thought we need to convert True into string. then i succeeded.
Let me know why we need to keep in it double quotations
--Ramu</description> <content:encoded><![CDATA[<p>I just tried by keeping TRUE in double quotations  then it has executed True conditon statement. i thought we need to convert True into string. then i succeeded.<br
/> Let me know why we need to keep in it double quotations<br
/> &#8211;Ramu</p> ]]></content:encoded> </item> <item><title>By: RamaSubramanian</title><link>http://www.learnqtp.com/difference-between-numeric-boolean-string-comparison-qtp/comment-page-1/#comment-340</link> <dc:creator>RamaSubramanian</dc:creator> <pubDate>Sat, 31 Jan 2009 01:25:30 +0000</pubDate> <guid
isPermaLink="false">http://www.learnqtp.com/difference-between-numeric-boolean-string-comparison-qtp/#comment-340</guid> <description>Pulekar! your explaination too seems to be okay to me!.....
I would request people who comment here also make an effort to correct each other!.....Pin-point if anyone is CORRECT or INCORRECT!.......
.........AND NOT JUST KEEP POSTING YOUR ANSWERS/COMMENTS to the given question!
The idea is to make this forum interesting and interact with each other!....openly !....!
I certainly don&#039;t have any problem if anyone pinpoints that I am wrong!.......except!.....kindly comment where I have gone wrong!
Hope the comment is well taken!
Thanks
Subramanian</description> <content:encoded><![CDATA[<p>Pulekar! your explaination too seems to be okay to me!&#8230;..</p><p>I would request people who comment here also make an effort to correct each other!&#8230;..Pin-point if anyone is CORRECT or INCORRECT!&#8230;&#8230;.</p><p>&#8230;&#8230;&#8230;AND NOT JUST KEEP POSTING YOUR ANSWERS/COMMENTS to the given question!</p><p>The idea is to make this forum interesting and interact with each other!&#8230;.openly !&#8230;.!</p><p>I certainly don&#8217;t have any problem if anyone pinpoints that I am wrong!&#8230;&#8230;.except!&#8230;..kindly comment where I have gone wrong!</p><p>Hope the comment is well taken!<br
/> Thanks<br
/> Subramanian</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 4/22 queries in 0.046 seconds using disk: basic

Served from: www.learnqtp.com @ 2012-02-10 13:43:29 -->
