Subject: SP2 advice... (This message is being sent to all CPSC 102 Sec 1 students ) An inquisitive student asks: "Iwas working on the plane_hits function and I am at the dist computation part. Your comments say ndotq is precomputed in plane_init. plane_init is the last function of the plane.c program. Can i say pln->ndotq in my hit distance computation considering it hasn't been computed yet since plane_init is the last function in the plane.c module." ----------- Dr. Westall sez: Your observation indicates that you are thinking about the problem rather than doing "plug and pray." This is good and you are to be commended for your efforts! However, your fears are unfounded. I think they are based upon a an incorrect mental model of how programs work. I will try to fix this but if you don't understand this you need to come see me for further help. You seem to be concerned that because plane_init() is PHYSICALLY AT THE END of plane.c that means that that the plane_init() function will not and can not run until all of the functions that physically precede it in the module have run. Your fears are unfounded because The physical order of the functions within the module has NOTHING to do with the order in which they execute. If you look at plntest.c you will see 52 plane_init(stdin, model, 0); occurs at line 52.. This causes the plane_init() code to execute. The first call to plane hits occurs (indirectly) later at line 70 here: 70 dist = obj1->hits(obj1, view, unit); Hence the order of execution of functions within a module is TOTALLY defined by the order in which they are invoked and has NOTHING to do with their order within the module! Hope this clarifies.