Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!magnus.ircc.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!UCONNVM.BITNET!STEIN From: STEIN@UCONNVM.BITNET (Alan Stein) Newsgroups: comp.sys.apple2 Subject: Orca/C Bug? Message-ID: <9103081247.AA24460@apple.com> Date: 8 Mar 91 12:41:01 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 46 I've been having problems with functions returning values. For example, the following bombed: float f(x) float x; { return (x*x); } void main () { float y; ... y = f(x); ... } while, changing just those lines to the following works fine: void f (x,py) float x,*py; { y = x*x; } void main () { float x,y; ... f(x,&y); ... } The former seemed to work fine until I added a printer routine to my program. This kind of thing has happened several times, both with functions I've defined myself, as above, and with some functions from the Orca/C library, including some of the string functions (p2cstr,c2pstr, atof,strcpy,strcat) and trig functions (sin). __________________________________________________________ | | | Alan H. Stein | stein@uconnvm.bitnet | | Department of Mathematics | | | University of Connecticut | Compu$erve 71545,1500 | | 32 Hillside Avenue | GEnie ah.stein | | Waterbury, CT 06710 | SNET (203) 757-1231 | |__________________________________________________________|