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

Documentation error for GETVIEWCOORD_W ?

dboggs
New Contributor I
935 Views

I believe I have stumbled across an error in the documentation for the Quickwin graphics subroutines GETVIEWCOORD and GETVIEWCOORD_W. The description says "Translate physical coordinates or window coordinates to viewport coordinates." Presumably the physical coordinates applies to Getviewcoord and the window coordinates applies to Getviewcoord_w. The syntax for the former is

CALL GETVIEWCOORD (x, y, t)
where x, y are INTEGER(2) physical coordinates and t is derived type xycoord having INTEGER(2) members xcoord, ycoord. This much is correct.

The syntax for the latter is

CALL GETVIEWCOORD_W (wx, wy, wt)
where wx, wy are REAL(8) window coordinates and wt is derived type wxycoord having REAL(8) members wx and wy. This must be incorrect, for it implies a conversion from window coordinates to window coordinates. It won't even compile, giving the argument type mismatch error. I believe the correct syntax is

CALL GETVIEWCOORD_W (wx, wy, t)
which would convert window coordinates wx, wy to viewport coordinates t%xcoord, t%ycoord.

In my (very) limited testing so far, this corrected syntax appears to be exactly what the subroutine is doing.

0 Kudos
6 Replies
andrew_4619
Honored Contributor III
935 Views

[fortran]    INTERFACE
    SUBROUTINE GETVIEWCOORD_W(WX,WY,S)
         !DEC$ ATTRIBUTES DEFAULT :: GETVIEWCOORD_W
         !DEC$ ATTRIBUTES DECORATE, ALIAS:"_f_getviewcoord_w" ::  GETVIEWCOORD_W
          DOUBLE PRECISION WX,WY
          STRUCTURE/XYCOORD/
               INTEGER*2 XCOORD
               INTEGER*2 YCOORD
          END STRUCTURE
          RECORD/XYCOORD/S
          !DEC$ ATTRIBUTES REFERENCE ::  S
        END SUBROUTINE
    END INTERFACE

[/fortran]

From IFQWIN

0 Kudos
dboggs
New Contributor I
935 Views

What?

0 Kudos
Steven_L_Intel1
Employee
935 Views

This was reported a couple of months ago and is corrected for the next major release.

0 Kudos
dboggs
New Contributor I
935 Views

Thank you Steve.

0 Kudos
andrew_4619
Honored Contributor III
935 Views

@ #5 I was agreeing with you. The interface in IFQWIN does not match the documentation, when confused I always look at the interface.

0 Kudos
dboggs
New Contributor I
935 Views

Thanks. I see now what you mean.

0 Kudos
Reply