[THIN] Re: OT: Computer Language Phrasebook Website [Plug & a request for help]

  • From: "Braebaum, Neil" <Neil.Braebaum@xxxxxxxxxxxxxxxxx>
  • To: <thin@xxxxxxxxxxxxx>
  • Date: Mon, 25 Oct 2004 10:31:26 +0100

Not sure exactly what your question was - but was it whether you *can*
do the default option in select...case...endselect constructs in
vbscript / WSH, like you can in others (eg Kix)?

If so, there's always the case else thing in vbscript.

Neil

> -----Original Message-----
> From: thin-bounce@xxxxxxxxxxxxx 
> [mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Spriggs Jon
> Sent: 25 October 2004 10:01
> To: windows2000@xxxxxxxxxxxxx; thin@xxxxxxxxxxxxx
> Subject: [THIN] OT: Computer Language Phrasebook Website 
> [Plug & a request for help]
> 
> 
> Hi all, 
> I wonder if anyone can assist me with a project I'm working 
> on. Basically, I'm a programmer who uses a couple of 
> different programming languages, and I always get lost with 
> the semantics of the different dialects. In order to make it 
> a bit easier, I've started a website called the "Computer 
> Language Phrasebook" at http://language.hollosite.com which, 
> I'm hoping will be a series of short statements like the 
> following (from 
> http://language.hollosite.com/modules.php?name=News&file=artic
le&sid=3&mode=&order=0&thold=0):
Case Statements are a simple and easy way to check what one variable is
doing. It's certainly a lot quicker than doing lots of If, ElseIf, Else
and End Ifs. Here's a quick rundown on how to use them in PHP and VB
Script.


In PHP you have a distinct advantage over VBScripters, in that there's
also a default value that you can select. You can also group together a
set of case statements.

Switch ($varname) {
Case "Option1":
echo "Option1";
break;
Case "Option2":
Case "Option3":
echo "Options 2 or 3";
break;
Case "Option4":
echo "Option 4";
Case "Option5":
echo "And option 5";
break;
Default:
echo "All other options";
}

-- Windows Scripting Host --

Select Case strVariable
Case "Value 1"
wscript.echo "Value 1"
Case "Value 2"
wscript.echo "Value 2"
End Select

And, hopefully, people will then add comments to this article with
things like "In perl you do it as follows:" or "It's wrong - WSH can
have a default value" (in which case, I'll learn things as well :) )
So... if you've got time to lend a hand, I'd be grateful. I'm adding
stuff in on the fly as I think of it, so if you've got anything to add,
then this site will become a great resource. Likewise, if you know any
sites that do something like this already, let me know and I'll talk to
them about sharing content. Cheers, 
Jon Spriggs 

***********************************************
This e-mail and its attachments are confidential
and are intended for the above named recipient
only. If this has come to you in error, please 
notify the sender immediately and delete this 
e-mail from your system.
You must take no action based on this, nor must 
you copy or disclose it or any part of its contents 
to any person or organisation.
Statements and opinions contained in this email may 
not necessarily represent those of Littlewoods.
Please note that e-mail communications may be monitored.
The registered office of Littlewoods Limited and its
subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
Registered number of Littlewoods Limited is 262152.
************************************************

********************************************************
This Weeks Sponsor RTO Software
Do you know which applications are abusing your CPU and memory?
Would you like to learn? --   Free for a limited time!
Get the RTO Performance Analyzer to quickly learn the applications, users,
and time of day possible problems exist.
http://www.rtosoft.com/enter.asp?id=320
********************************************************** 
Useful Thin Client Computing Links are available at:
http://thin.net/links.cfm
***********************************************************
For Archives, to Unsubscribe, Subscribe or 
set Digest or Vacation mode use the below link:
http://thin.net/citrixlist.cfm

Other related posts: