Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.atnf.csiro.au/computing/software/gipsy/sheltran/SELECT.html
Дата изменения: Unknown
Дата индексирования: Fri Jan 16 23:52:46 2009
Кодировка:

Поисковые слова: обвмадеойс нефептощи рпфплпч
Sheltran - SELECT construct

Sheltran - SELECT construct


Form:

      SELECT <arithmetic expression>
      CASE n1 [,n2...]
    [    <statement>...         ] 
    [ CASE m1 [,m2...]
         <statement>...         ] 
      OTHER 
    [    <statement>...         ] 
      CSELECT

Notes:

Actions:

The expression after the SELECT is evaluated and truncated to an integer value. Control is transferred to the statements following the CASE statement which contains the value of the SELECT expression. If no such value can be found, the OTHER clause is selected. Finally control is transferred to the statement after CSELECT.

Example:

      SELECT COLOR+1.0
      CASE 1
         COLTXT='BLACK'
      CASE 2
         COLTXT='RED'
      CASE 3
         COLTXT='GREEN'
      CASE 5
         COLTXT='BLUE' 
      CASE 8
         COLTXT='WHITE'
      OTHER 
         COLTXT='MIXTURE'
      CSELECT

Programming GIPSY