Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Switch syntax

zxu4
Beginner
870 Views
I cann't find how to write switch statement in Fortran from help.
I want to write something like this:

Switch(num)
case 1:
...
case 2:
...
return

Any advice?

Thanks!

Roy
0 Kudos
1 Reply
Steven_L_Intel1
Employee
870 Views

select case (num)
case (1)
some code here
case (2:5)
some code here
case default
some code here
end select
0 Kudos
Reply