- You can "roll your own":
integer function MyRGB(iR, iG, iB) integer, intent(in):: iR, iG, iB MyRGB = ISHL(iB,16) + ISHL(iG,8) + iR end function MyRGB
- or use explicit conversion at input, e.g. RGB(90_1, 90_1, 90_1) or RGB(INT1(iR), INT1(iG), INT1(iB))
- or, as I prefer, simply use hex-form instead (#BBGGRR). That won't make fortran-95 standards checking happy though. IIRC form Z'BBGGRR' is also not allowed in expressions.
Just to remind Steve about "stylesheet" thingo ;-). ("Stylesheets" are user-defined subsets of language extensions, where user can control what compiler will complain about. That's on users' wish list for quite a time).