![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Newbie
Join Date: Mar 2006
Posts: 8
Rep Power: 0
![]() |
so
if computer = "computer1" & "computer2" Then wouldnt work? |
|
|
|
|
|
#12 | |
|
Programmer
Join Date: Oct 2005
Location: India
Posts: 30
Rep Power: 0
![]() |
Quote:
|
|
|
|
|
|
|
#13 |
|
Programmer
Join Date: Oct 2005
Location: India
Posts: 30
Rep Power: 0
![]() |
<html>
<head>
</head>
<body>
<script type="text/vbscript">
dim comp
dim names(3)
comp="Jani"
names(0)="tove"
names(1)="Jani"
If comp=names(0) or comp=names(1) then
document.write(comp)
Else
document.write("not found")
end If
</script>
</body>
</html> |
|
|
|
|
|
#14 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
There's a big difference in the way you choose to express it. Distinguish between ORing (or ANDing) two values and testing the result against a third, and testing the result of whether or not EITHER (or BOTH) of the two values is equal to another.
if (C == A OR B) tests to see if C is equal to A ORed with B. if ((C == A) OR (C == B)) test to see if C is equal to A or if C is equal to B. In some languages, JS among them, == and = mean two different things. The precedence of operations in the language will determine the amount of parenthesization that is necessary for correctness.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|