[net.micro.mac] MPW C

rae@unicus.UUCP (Clith de T'nir) (10/22/86)

  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