Wrox Programmer Forums
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 13th, 2003, 04:42 AM
Authorized User
 
Join Date: Aug 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default Code fragment

Hi there here is a small fragment of code, could someone tell me what the Bolded FALSE statement in the 2nd IF is evaluating please.

If Session("MM_Username") <> "" Then
  If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
     InStr(1,MM_authorizedUsers,Session("MM_UserAuthori zation"))>=1) then
    MM_grantAccess = true
  End If
End If

Many Thanks


 
Old November 13th, 2003, 05:07 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
Default

First the syntax is incorrect: You are missing a ( in front of Instr.

False is a constant so it always evaluates to False. And, given your boolean conditionals are all OR, it is unnecessary.

Looks like someone put it there in place of some previous conditional test.






Similar Threads
Thread Thread Starter Forum Replies Last Post
for-each on result tree fragment RoeZ XSLT 11 November 22nd, 2007 07:31 AM
Urgent:hard disk serial code and vb code ivanlaw Pro VB 6 0 July 25th, 2007 04:05 AM
VB: .Exe file, serial code and activation code ivanlaw Pro VB 6 8 July 6th, 2007 05:44 AM
un escape text to use as fragment brenchley XSLT 1 December 13th, 2005 10:25 AM
Writing Client Side Script from Code-Behind code sajid_pk Classic ASP Databases 1 January 18th, 2005 12:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.