Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site unicus.UUCP Path: utzoo!mnetor!yetti!unicus!rae From: rae@unicus.UUCP (Clith de T'nir) Newsgroups: net.micro.mac Subject: MPW C (ANSI extensions?) Message-ID: <280@unicus.UUCP> Date: Wed, 22-Oct-86 12:37:26 EDT Article-I.D.: unicus.280 Posted: Wed Oct 22 12:37:26 1986 Date-Received: Thu, 23-Oct-86 19:00:11 EDT Organization: Unicus Software Inc. Lines: 28 I recently had problems with MPW C (a.k.a. Green Hills C) version 1.0b1. I was using the GetTrapAddress() function so as to speed things up, so I declared a pointer to a pascal function returning void as follows pascal void (*foo)(); I then later would say ... foo = (pascal void(*)())GetTrapAddress(VALIDADDRESS); C complained about this. It turned out that in order to use foo, I had to declare it as follows: pascal void (*foo)(Ptr textBuf, int firstByte, int byteCount); (using DrawText as an example). Is this an ANSI extension to C? Are there others? MPW C also allows declarations of the form extern char *myFunc(int x, int y, int z); char *myFunc(x,y,z) int x, y, z; extern; The two declarations above are equivalent as far as MPW C is concerned. Reply by mail and I'll post a summary. -- "(*((int(*)()) ((ptr_fint *)0x0071d700) [43])) (1);" -- net.lang.c++ Reid Ellis, aka Clith de T'nir {decvax,allegra,ihnp4,pyramid}!utzoo!utcs!yetti!unicus!rae or... seismo!mnetor!yetti!unicus!rae