I was discussing some features of f90/f95 today with some other people here,
and the syntax of SELECT CASE blocks came up. After consulting Metcalf &
Reid, we noticed that it is possible to label the SELECT CASE and END SELECT
statements, as well as the individual CASE statements withing the block. I
presume this is simply to clarify the logic of nested SELECT blocks, and has
no connection to EXIT statements. Furthermore, it is my understanding that
C-style fall-through logic with SELECT CASE is not implemented in f90.
My friend pointed out that disallowing CASE block fall-through renders
techniques such as Duff's device impossible, which is not necessarily a Bad
Thing. ;-)
However, I wonder if it is, in fact, possible to implement Duff's device in
f90. And perhaps somebody with a better knowledge of [evil coding practices
in] C could actually explain Duff's device to the rest of us.
Thanks,
Ted
--
Ted Stern Porting/Tuning/Analysis, Applications & Libraries
Cray Inc. http://www.tera.com
411 First Avenue South, Suite 600 Direct 206/701-2182, Main 701-2000
Seattle, WA 98104-2860 Fax1 206/701-2205, Fax2 701-2500
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|