[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Built-in function for `switch'

From: Guido Dietz
Subject: Re: Built-in function for `switch'
Date: Sat, 01 Mar 1997 15:15:31 +0100

Puhh, very promt implementation of switch. Your support is better than any
commercial one!

 On Fri, 28 Feb 1997 16:26:33 -0600 you, "John W. Eaton", wrote:
> Now for some questions I have about the MATLAB implementation of this
> statement:
I didn't get the right passcode for running Matlab 5 yet. So the following
infos are all from the manual, as far as I understood that right ;-)

>   * Does it require constant labels?
Seems so, look below ...

>   * Do the labels have to be unique?
No, but the second occurence will have no effect :-), see below ...

>   * Are the command lists optional?
Hmm, I will test it ...

>   * Is a separator (newline, comma, or semicolon) required between the
>     case labels and the command lists?

>   * Are the `case' and `otherwise' clauses optional (i.e., is `switch end' 
>     a valid statement)?
"Any number of case groups" is allowed, I 'll test the zero ...

They say:
switch *expression* (scalar or string)
  case value1
  case value2

o The word swtitch followed by a scaler or string expression to evaluate.
o A case group consists of the word case followed by a possible value for
  expression, all on a single line! switch executes the following statements
  until MATLAB encounters the next case statement or the otherwise statement.
  Only the first matching case is executed!


            Guido Dietz                   Email:    address@hidden
Aerodynamisches Institut der RWTH-Aachen  WWW:
      Wuellnerstr. zw. 5 u. 7             Ftp:
      D-52062 Aachen, Germany   Phone: +49-241-80-5426 Fax: +49-241-8888-257
        Your home electrical system is basically a bunch of wires that
bring electricity into your home and take if back out before it has a
chance to kill you.  This is called a "circuit".  The most common home
electrical problem is when the circuit is broken by a "circuit
breaker"; this causes the electricity to back up in one of the wires
until it bursts out of an outlet in the form of sparks, which can
damage your carpet.  The best way to avoid broken circuits is to change
your fuses regularly.
        Another common problem is that the lights flicker.  This
sometimes means that your electrical system is inadequate, but more
often it means that your home is possessed by demons, in which case
you'll need to get a caulking gun and some caulking.  If you're not
sure whether your house is possessed, see "The Amityville Horror", a
fine documentary film based on an actual book.  Or call in a licensed
electrician, who is trained to spot the signs of demonic possession,
such as blood coming down the stairs, enormous cats on the dinette
table, etc.
                -- Dave Barry, "The Taming of the Screw"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]