Version 1.0
IRIS WORKSTATION GUIDE 85
Appendix D:
keep them around (rather than compiling source directly to an executable each time)
,
you
must add rules to your makefile’s to treat them correctly. The makefile example in Section D.2
contains the correct rules. Note also that the .j suffix must be included on the” .SUFFIXES:”
line.
D.4 Warnings on Using FORTRAN Types
Calls to the IRIS Graphics Library often use small numbers as parameters (i.e.,
one- or two-byte integers). When calling the IRIS Graphics Library from C,
such parameters are converted automatically when the call is made. This is not
true in FORTRAN, as the data is passed as a pointer (reference parameter),
rather than as a value. Thus, it is
imperative
that the caller specify the correct
type for each parameter in each call to a graphics routine from FORTRAN.
Commonly used constants have been placed in the common blocks
GL
and
DEVICE
in the
include
files described previously, and initialized correctly (in the
block data routine
GLDATA
in the file
fgldat.j
) for convenience. Care must be
exercised when using user-defined variables as parameters to graphics routines,
so that the parameter types are correct.
A particularly troublesome case is the use of numeric constants as parameters.
For example, it is tempting to call a routine such as
curveit
(
CURVEI
in FORTRAN)
with a numeric constant:
call curvei (4)
This will not produce the desired result. The definition for
CURVEI
in
FORTRAN is
subroutine curvei(count)
integer*2 count
The numeric constant ’4’ will be passed by FORTRAN as an integer*4 , and the
IRIS Graphics Library will receive the constant zero (0), not 4. In cases like this,
the user must place the constant 4 in a variable of type integer*2. The following
code sequence gives the desired result:
integer*2 s4
data s4/4/
...
call curvei (s4)
...
One further confusing situation occurs when using the type
logical
. The IRIS
Graphics Library expects this type to occupy a single byte of storage, and when
it returns such a value, only the least significant byte of the result is valid. The
FORTRAN compiler expects a function of type
logical
to return a four-byte
quantity. The definitions of graphics routines of type
logical
have been altered
in the include file
/usr/include/fgl.h
to be of type
logical*1
to alleviate this
problem. So long as this include file is used, the problem should not occur.
Summary of Contents for IRIS Workstation
Page 1: ...IRIS Workstation Guide Version 1 0 Silicon Graphics Inc Mountain View California 94043 ...
Page 6: ...2 IRIS WORKSTATION GUIDE Version 1 0 Introduction ...
Page 24: ...20 IRIS WORKSTATION GUIDE Version 1 0 Hardware Installation ...
Page 30: ...26 IRIS WORKSTATION GUIDE Version 1 0 Operation ...
Page 48: ...44 IRIS WORKSTATION GUIDE Version 1 0 System Administration ...
Page 50: ...46 IRIS WORKSTATION GUIDE Version 1 0 Appendix A ...
Page 74: ...70 IRIS WORKSTATION GUIDE Version 1 0 Appendix B ...
Page 77: ...Version 1 0 IRIS WORKSTATION GUIDE 73 Appendix C e random gr error f wnrepaint ...
Page 78: ...74 IRIS WORKSTATION GUIDE Version 1 0 Appendix C ...
Page 92: ...88 IRIS WORKSTATION GUIDE Version 1 0 Appendix D ...
Page 102: ...98 IRIS WORKSTATION GUIDE Version 1 0 Appendix E ...
Page 103: ...Appendix F Manual Pages ...
Page 104: ......
Page 131: ...Version 1 0 126 IRIS WORKSTATION GUIDE Appendix F ...
Page 132: ......
Page 136: ...130 IRIS WORKSTATION GUIDE Version 1 0 Appendix H ...
Page 152: ...146 IRIS WORKSTATION GUIDE Version 1 0 Appendix J ...