Page 1 of 1 1
Topic Options
#127977 - 2004-10-15 04:37 PM SELECT CASE with using "OR" logic?
misty Offline
Fresh Scripter

Registered: 2004-10-14
Posts: 31
I need to do some code like th following:

SELECT
CASE #ProductType = "Windows NT Workstation" or "Windows 2000 Professional" or "Windows XP Professional"
CASE @ProductType = (something other than the above)
ENDSELECT

Or would this be better with an "IF"? I am not sure about using "OR" and I'm also not sure about evaluating strings with the = sign. Is there a better way to do it? This is all new to me who am used to UNIX shell scripting.

Top
#127978 - 2004-10-15 04:50 PM Re: SELECT CASE with using "OR" logic?
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
if that's what you are literally trying to do, check out the @inwin macro

Quote:


@InWin Operating system: 1 = Windows NT; 2 = Windows 9x



_________________________
Eric

Top
#127979 - 2004-10-15 04:50 PM Re: SELECT CASE with using "OR" logic?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Close, but no cigar. What an I saying... not even close.

you can use OR but you need as many = as you have OR.

CASE @ProductType = "Windows NT Workstation" or @ProductType = "Windows 2000 Professional" or @ProductType = "Windows XP Professional"
CASE 1 ;none of the above
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#127980 - 2004-10-15 11:12 PM Re: SELECT CASE with using "OR" logic?
misty Offline
Fresh Scripter

Registered: 2004-10-14
Posts: 31
Makes sense!
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 259 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.05 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

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