![]() |
![]() |
||||||
|
|||||||
| Tags: |
![]() |
|
|||
|
What is your objective? What is the failure mode?
You are asking if the page is not 1 OR if it is not 2. That means if it is 1 it meets the second condition of NOT being 2. Wouldn't it be easier to ask if #page_indicator_a# GT 2? Or <cfif #page_indicator_a# NEQ '1' AND #page_indicator_a# NEQ '2'> |
|
|||
|
idesdema wrote:
> > Can someone tell me why!? > As tclaremnot said it is the 'OR'. The if statement will be true if either side is true. So if the value is 1 then it is NOT 2 and so the combination is true. If the value is 2 then it is NOT 1 and so the combination is true. If the value is 3 then both NOT 1 and NOT 2 is true so it is true. You have written a statement that can never be false, unless you can somehow have a value that is both 1 and 2 at the exact same time. Now that I have my boolean logic lecture out of my system your solutions is probably either: <cfif #page_indicator_a# NEQ '1' AND #page_indicator_a# NEQ '2'> OR <cfif NOT (#page_indicator_a# EQ '1' OR #page_indicator_a# EQ '2')> |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise