Page 1 of 1 1
Topic Options
#173921 - 2007-02-14 08:44 PM Shorten IF...OR...OR?
tylan Offline
Starting to like KiXtart

Registered: 2005-11-17
Posts: 115
Loc: Johnstown, PA
How can I shorten an IF... OR... OR....

 Code:
IF @ProductType = "Windows 2000 Professional" OR @ProductType = "Windows 2000 Server" OR @ProductType = "Windows 2000 Domain Controller"

Top
#173923 - 2007-02-14 09:19 PM Re: Shorten IF...OR...OR? [Re: tylan]
eriqjaffe Offline
Hey THIS is FUN

Registered: 2004-06-24
Posts: 214
Loc: Arlington Heights, IL USA
In your case...

 Code:
if instr(@ProductType,"Windows 2000")

Top
#173968 - 2007-02-16 10:05 AM Re: Shorten IF...OR...OR? [Re: eriqjaffe]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
If you need to check for explicit strings, you can do something like this:
 Code:
$asWindows2K="Windows 2000 Professional","Windows 2000 Server","Windows 2000 Domain Controller"
 
IF 1+AScan($asWindows2K,@ProductType)
	...
EndIf

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 641 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.052 seconds in which 0.024 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org