update: RECTRE problems
tom rohling
trohling at uceng.UC.EDU
Mon Dec 4 19:02:27 AEST 1989
A few days back, I posted an article about RECTRE not appearing to be
functioning right. Well, here's an update.
Consider this piece of code:
CALL READSO(1)
TEST=RECTRE(1,1,640,484,SGIS)
CALL COLOR(0)
CALL CLEAR
CALL MAPCOL(3,255,0,255)
CALL RECTWR(1,1,640,484,SGIS)
DO 10 II=1,309760
IF(SGIS(II).EQ.3)THEN
WRITE(6,*)II,SGIS(II)
ENDIF
10 CONTINUE
Here's the expanation:
The window is only 640x484 in size.
The window is cleared black and a few lines of large yellow(3) text
are written across the window.
I put the READSO there just to be safe and supress any
possibilities from this.
Next, it loads the array SGIS, then I cleared the screen (just to
be sure), then redefine color 3 to see if it will show a change
in color when I redraw the image.
Then call RECTWR to redraw the same image.
That works just fine, with the text appearing as magenta, so its
in the array somehow.
* This shows that RECTRE in functioning correctly.
Now comes the strange part.
I try to scan through the array and write all color 3 entries to
the screen. I know there are quite a few because the text changed
color when I redefined it.
But nothing gets written to the screen which means (??) that there were
no 3 entries in the comparison.
This doesn't make any sense.
The array SGIS is declared as INTEGER*2, but are the elements of that array
written in some goofy fashion like hex or something? When I tried to write
out the entire array, it was mostly large negative numbers (like -24000
something) but I know SGIS is correct else RECTWR wouldn't have given the
correct results.
What !exactly! is the format of the result of RECTRE (details!)???
Any clues??
Tom Rohling
CFD dude
Aerospace Eng.
University of Cincinnati
trohling at uceng.uc.edu
==========================================================================
If your standing on the North Pole, what time is it?
==========================================================================
More information about the Comp.sys.sgi
mailing list