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

FYI: Switch / Case error



PureBytes Links

Trading Reference Links

There is an error in the switch / case logic that will verify, and apparently generates correct logic, but it will be corrected in later versions.

Incorrect code :

Switch  Value0  begin
  Case 01: Value1  = 01 ;
  Case 02: Value1  = 02 ;
           Value2  = 03 ;
  Case 03: Value1  = 03 ;
           Value2  = 04 ;
           Value3  = 05 ;
  Case 05: Value1  = 5
  Default: Value1  = 00 ;
End ;

The corrected code is below...

Switch  Value0  begin
  Case 01: Value1  = 01 ;
  Case 02: begin
             Value1  = 02 ;
             Value2  = 03 ;
           end ; // case 02
  Case 03: begin
             Value1  = 03 ;
             Value2  = 04 ;
             Value3  = 05 ;
           end ; // case 03
  Case 05: Value1  = 5
  Default: Value1  = 00 ;
End ; // switch


Samuel K. Tennis
Vista-Research                        voice: 1(850) 243-5105
129 Staff Drive, NE                    cell: 1(850) 582-7342
Ft. Walton Beach, FL  32548             fax: 1(510) 743-8274
<SKTennis@xxxxxxxxxxxxxxxxxx> <http://www.vista-research.com>

        ***** EasyLanguage Spoken Here *****