Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!metro!usage!usage.csd!lambert From: lambert@spectrum.eecs.unsw.oz (Tim Lambert) Newsgroups: comp.sys.apollo Subject: Re: bitmap and image conversion programs Message-ID: Date: 9 Apr 90 09:03:55 GMT References: <1990Apr8.161841.14435@bath.ac.uk> Sender: news@usage.csd.unsw.oz Organization: none Lines: 40 In-reply-to: @gdt.bath.ac.uk's message of 8 Apr 90 16:18:41 GMT In article <1990Apr8.161841.14435@bath.ac.uk> @gdt.bath.ac.uk writes: The graphics programs made available by ROQUE OLIVEIRA (oliveria@caen.engin.umich.edu) at freebie.engin.umich.edu contain gpr calls of the following type... status_$t status; gpr_$***(...,...,&status) Why is status passed as &status? I'm using SR9.7 (still, maybe this summer we'll "upgrade" :-)), Apollo CC, Rev 5.50 Because he's using #include and not #include /sys/ins/gpr.ins.c Compare /sys/ins/gpr.ins.c std_$call void gpr_$terminate (); with /usr/include/apollo/gpr.h extern void gpr_$terminate ( boolean & delete_disp, /*whether to delete dm frame */ status_$t * status); /*returned status */ The std_$call makes all the arguments get passed by reference (so when you say just status, the address gets passed), whereas the function prototype says that status is passed by value so you need the more natural &status. The function prototype is preferable since the types of arguments get checked, but I don't think this exists in 9.7 [ I've got the recent bgc.pas converted to bgc.c if anyone is interested ] Wow! Does it work under 9.7? :-)