Possible switch/case bug
- Posted by wynco Jun 14, 2012
- 1211 views
The following code 'works' when interpreted, but generates a duplicate case value error if compiled with gcc.
It should generates a duplicate case value error when interpreted, or am I missing something.
I also noticed that the last 'case' will trigger, regardless which 'case' comes first. Should it not trigger the first case?
include std/console.e constant min = 1 constant max = 1 integer test = min switch test do case min then printf(1,"Min = %d",min) case max then printf(1,"Max = %d",max) end switch wait_key()