[comp.sys.amiga] Question about TmpRas

dillon@CORY.BERKELEY.EDU (Matt Dillon) (08/29/88)

:On line 51 there is a piece of code which the Manx3.6 compiler doesn't 
:like:
:	Window->RPort->TmpRas = 
:		InitTmpRas(&tmpras, raster, RASSIZE(maxx, maxy);

	Gosh, you're missing a parenthesis.

	Window->RPort->TmpRas = 
		InitTmpRas(&tmpras, raster, RASSIZE(maxx, maxy));


					-Matt

murphy@pur-phy (William J. Murphy) (09/01/88)

Matt, thanks for the observation about the missing parentheses, but that
was a typoe while posting the question.  My question still stands.
What is wrong with this code,
	Window->RPort->TmpRas =
		InitTmpRas(&tmpras, raster, RASSIZE(maxx, maxy));
The Manx compiler gives an error of illegal type conversion.  As I 
previously said, the InitTmpRas function is declared to be a void
and should not return anything.  So why would someone write this?

The line of code is taken out of Flynn D. Fishman's program
Graph It ][, subprogram three-d.c.  I did not write the code, I am 
only trying to get it to run.

Does anyone have a serious answer? Matt?
Thanks
Bill Murphy
murphy@newton.physics

dillon@CORY.BERKELEY.EDU (Matt Dillon) (09/01/88)

:was a typoe while posting the question.  My question still stands.
:What is wrong with this code,
:	Window->RPort->TmpRas =
:		InitTmpRas(&tmpras, raster, RASSIZE(maxx, maxy));
:The Manx compiler gives an error of illegal type conversion.  As I 

	Oh, sorry.  I should have realized it wasn't as easy as that....
RKM says you are right.  Manx compiler did the right thing giving the error.

	So the code is wrong.  What you need to do is:

	InitTmpRas(&tmpras ...);
	Window->RPort->TmpRas = &tmpras;

>previously said, the InitTmpRas function is declared to be a void
>and should not return anything.  So why would someone write this?
>Bill Murphy
>murphy@newton.physics

				-Matt