Published on March 9, 2014
Basic Scientific Programming Case Statement
The Case Construct Used in cases where exactly one of several alternative actions is selected and performed. form Select Case(Selector) case(label-list1) statement sequence1 case(label-list2) statement sequence2 “ case(label-list n) statement sequence n End select
Selector is an integer, character, or logical expression. The values in the list may have any of the forms: (value) single value (value1: value2) range of values from value1 through value2. (value1:) range of values greater than or equal to value1 (: value2) range of values less than or equal to value2
Example Select Case(Class_Code) Case(1) print*,’Freshman’ Case(2) print*,’Sophomore’ Case(3) print*,’Junior’ Case(4) print*,’Senior’ Case Default print*, ‚error,Illegal code‛ End Select
Example: Pollution Index A case statement can be used to carry out the classification given (good, fair, or poor). A case statement can be used to replace an IF / ELSE IF structure.
Range Selectors “Integers” Select Case(Int(average)) case(90:) grade = ‚A‛ case(80:89) grade = ‚B‛ case(70:79) grade = ‚C‛ case(60:69) grade = ‚D‛ case(:59) grade = ‚F‛ End Select
Range Selectors “Characters” Select Case(char) case(‘A’: ‘Z’) Print*, ‘uppercase’ case(‘a’: ’z’) Print*, ‘lowercase’ case(‘0’:’9’) Print*, ‘numbers’ case default Print*, ‘Not a letter or number’ End Select
What about real valued selectors?? A selector can’t be of type real. To make a selection, convert the real number to an integer and then use it for the selection.
example Suppose a motors’ RPM is determined by an indicator x. high speed x>= 5.5 normal speed 2.5<= x < 5.5 Low speed x < 2.5 Select Case(int(10*x)) case(55:) print*, ‚HIGH SPEED‛ case(25:54) print*, ‚NORMAL SPEED‛ case(:24) print*, ‚LOW SPEED‛ End Select
This site is where you can find the best cases for your phone, tablet and laptop. Don't miss the best and cool cases for your beloved devices
Designed for larger smartphones, such as Motorola® Moto X™ and Galaxy™ S® III, the eSeries™ 9 case delivers submersible ...
Objektivköcher Lowepro Lens Case 9 x 13cm: Preis ab 19,90 € (30.10.2015). 34 Preise für Lowepro Lens Case 9 x 13cm Objektivzubehör - Preisvergleich ...
446 customizable 9 11 iPhone cases & covers from Zazzle - Choose your favorite 9 11 design from a variety of cases for the iPhone 6, 6 Plus, 5S, and 5C.
Keep that Nexus 9 covered When a new Android tablet like the Nexus 9 arrives, third-party cases soon follow. The folks at our store are working out exactly ...
created 9 months ago Taibas Playlist. a list ... Title: Case 39 (2009) 6.2 /10. Want to share IMDb's rating on your own site? Use the HTML below. ...
Supremery Ultra Slim HTC Nexus 9 Schutzhülle Flipcover Tasche Book Case mit Auto Sleep und Wake-funktion schwarz
My son sealed his cell phone in the e-series 9 case to go kayaking. The kayak tipped and the phone went into 4 feet of water near our sea wall.
The Google Nexus 9 is up for pre-order now (and you can pre-order it here if you haven’t already). It’s slated to launch on November 3rd for about $399 ...
Amazon.com: Google Nexus 9 Case - MoKo Ultra Slim Lightweight Smart-shell Stand Cover Case with Rubberized back for Google Nexus 9 8.9 inch Volantis ...