Thread View: net.micro.mac
1 messages
1 total messages
Started by Clith de T'nir
Wed, 22 Oct 1986 16:37
MPW C (ANSI extensions?)
Author: Clith de T'nir
Date: Wed, 22 Oct 1986 16:37
Date: Wed, 22 Oct 1986 16:37
28 lines
1530 bytes
1530 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads