Dr
Wed Dec 07 07:08:37 CST 2005
JRS: In article <#4jLUYq#FHA.3568@TK2MSFTNGP09.phx.gbl>, dated Tue, 6
Dec 2005 14:46:01 local, seen in news:microsoft.public.scripting.vbscrip
t, de Graff <rjdegraff@hydro.mb.ca> posted :
>Which would give possibly incorrect results because x=1,y=1 gives the same
>case as x=0.y=11
Accommodated by "something like"; the multiplier must obviously be
chosen to be greater than the range of variable y.
Please do not top-post or over-quote, especially signatures.
>"Dr John Stockton" <jrs@merlyn.demon.co.uk> wrote in message
>news:YcL6rMDVb1kDFwk$@merlyn.demon.co.uk...
>> JRS: In article <1133445931.966839.283400@g43g2000cwa.googlegroups.com>
>> , dated Thu, 1 Dec 2005 06:05:32 local, seen in news:microsoft.public.sc
>> ripting.vbscript, AndyZa <andyza@webmail.co.za> posted :
>>>Is there a way to convert the following into a Select Case statement?
>>>
>>>If ((x = 1) And (y = 1)) Then
>>> z = 123
>>>ElseIf ((x = 1) And (y = 2)) Then
>>> z = 456
>>>ElseIf ((x = 2) And (y = 1)) Then
>>> z = 789
>>>End If
>>
>> Maybe something like
>>
>> select case x*10 + y
>> case 11
>> z = 123
>> case 12
>> z = 456
>> case 21
>> z = 789
>> case else
>> z = 0
>>
>> --
>> ©
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME ©
Web <URL:
http://www.uwasa.fi/~ts/http/tsfaq.html> -> Timo Salmi: Usenet Q&A.
Web <URL:
http://www.merlyn.demon.co.uk/news-use.htm> : about usage of News.
No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.