About: Switch statement   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

AttributesValues
rdfs:label
  • Switch statement
rdfs:comment
  • A switch statement (or case statement) compares an expression with a series of values in a specified order and takes the action associated with the matching value. A default action can be specified, which will be taken if no match is found. In some languages, the expression must result in a scalar value, and the cases must be constant expressions. Typical syntax is: switch (expression) { case value1: //take action 1 break; case value2: //take action 2 break; case value3: //take action 3 break; default: take default action }
sameAs
dcterms:subject
dbkwik:code/proper...iPageUsesTemplate
abstract
  • A switch statement (or case statement) compares an expression with a series of values in a specified order and takes the action associated with the matching value. A default action can be specified, which will be taken if no match is found. In some languages, the expression must result in a scalar value, and the cases must be constant expressions. Typical syntax is: switch (expression) { case value1: //take action 1 break; case value2: //take action 2 break; case value3: //take action 3 break; default: take default action } Switch statements can be thought of as a terser way of expressing a series of cascading if-then-else statements. In this way, they provide a natural and readable way for a programmer to express this common decision-making behaviour.
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software