-
Recent Posts
Recent Comments
- David Jones on GPO To Set Firewall Exception For Windows 10 RDP
- Greg Woods on GPO To Set Firewall Exception For Windows 10 RDP
- Neil on GPO To Set Firewall Exception For Windows 10 RDP
- Gopal Sharma on GPO To Set Firewall Exception For Windows 10 RDP
- Rob Eberhardt on GPO To Set Firewall Exception For Windows 10 RDP
Archives
- March 2025
- September 2023
- February 2022
- July 2020
- November 2018
- October 2018
- May 2017
- April 2016
- March 2016
- November 2015
- October 2015
- September 2015
- June 2015
- May 2014
- August 2013
- July 2013
- March 2013
- August 2012
- June 2012
- May 2012
- February 2011
- December 2010
- November 2010
- October 2010
- August 2010
- June 2010
- October 2009
- September 2009
- May 2009
- April 2009
- March 2009
- September 2008
- August 2008
- July 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- July 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- May 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
- June 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
Categories
Meta
Monthly Archives: May 2006
Code: Custom IIF for VBscript
I add a custom IIF function to every VBscript I make:
' IIF recreated for VBscript FUNCTION IIF(Expression, Truepart, Falsepart) IF Expression THEN IIF = Truepart ELSE IIF = Falsepart END IF END FUNCTION 'used like so: strFlavor = IIF(strColor="brown", "chocolate", "not chocolate")
Mind you, it evaluates all parameters on the way in, so even though this checks the objTest object when assigning using it, it would still fail (when the objTest object reference is not set):
strFlavor = IIF(IsObject(objTest), objTest.flavor, "vanilla")
It’s no ternary operator, but it’s still indispensible for efficient VBScript coding.
…And finally someone else noticed.
Guess I’m not the only one who was baffled by the new W3C XMLHTTPRequest spec credits.
From Dare Obasanjo:
Interesting. A W3C specification that documents a proprietary Microsoft API which not only does not include a Microsoft employee as a spec author but doesn’t even reference any of the IXMLHttpRequest documentation on MSDN.
I’m sure there’s a lesson in there somewhere. 😉
And then finally from Anne van Kesteren (one of the spec’s authors):
Hereby my apologies to everyone who had to waste his time by writing a rant… The current draft reads: “Special thanks also to the Microsoft employees who first implemented the XMLHttpRequest interface, which was first widely deployed by the Windows Internet Explorer browser.”



