Subject: Code fragment
Posted By: pilmart Post Date: 11/13/2003 3:42:37 AM
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_UserAuthorization"))>=1) then
    MM_grantAccess = true
  End If
End If

Many Thanks


Reply By: U.N.C.L.E. Reply Date: 11/13/2003 4:07:24 AM
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.


Go to topic 6425

Return to index page 1006
Return to index page 1005
Return to index page 1004
Return to index page 1003
Return to index page 1002
Return to index page 1001
Return to index page 1000
Return to index page 999
Return to index page 998
Return to index page 997