As known, the 'case' statement must be used as follows:
Code: Select all
(case n
    (1 "one")
    (2 "two")          
    (3 "three")
    (4 "four")
    (true "Can't translate this")
)
Code: Select all
(constant 'one 1)
(constant 'two 2)
(constant 'three 3)
(constant 'four 4)
(case n
    (one "this is one")
    (two "this is two")
    (three "this is three")
    (four "this is four")
    (true "Can't translate this")
)
Code: Select all
(case k
	(0x0065:	#GLUT:GLUT_KEY_UP:
		(set 'view_rotx (add view_rotx 5.0))
	)
	(0x0067:	#GLUT:GLUT_KEY_DOWN:
		(set 'view_rotx (sub view_rotx 5.0))
	)
	(0x0064:	#GLUT:GLUT_KEY_LEFT:
		(set 'view_roty (add view_roty 5.0))
	)
	(0x0066:	#GLUT:GLUT_KEY_RIGHT:
		(set 'view_roty (sub view_roty 5.0))
	)
)
Why is this case statement designed this way? Wouldn't it be more convenient to use constants and even expressions as well?
Peter