Documentation error for GETVIEWCOORD_W ?

Documentation error for GETVIEWCOORD_W ?

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.

7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

    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

From IFQWIN

What?

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

Steve - Intel Developer Support

Thank you Steve.

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

Thanks. I see now what you mean.

Leave a Comment

Please sign in to add a comment. Not a member? Join today