Bitmap/Fortran: Difference between revisions

fixed improper use of the "where" statement
No edit summary
(fixed improper use of the "where" statement)
Line 36:
type(rgb), intent(out) :: color
integer, intent(in) :: red, green, blue
whereif ( red > 255 ) then
color%red = 255
elsewhereelseif ( red < 0 ) then
color%red = 0
else
color%red = red
end whereif
whereif ( green > 255 ) then
color%green = 255
elsewhereelseif ( green < 0 ) then
color%green = 0
else
color%green = green
end whereif
whereif ( blue > 255 ) then
color%blue = 255
elsewhereelseif ( blue < 0 ) then
color%blue = 0
else
color%blue = blue
end whereif
end subroutine set_color