More on Pyramid's not so non-standard C compiler

Ken Spagnolo KSpagnol at massey.ac.nz
Fri Aug 4 15:57:09 AEST 1989


Oops...  Well, I do feel dumb.  I obviously haven't been keeping up with
what is going into the ANSI standard recently (read last few years). But what
is weird to me is that, from your letters and postings, this way of passing
pointers to structures that I didn't know about (given: struct x x; using
y(&x); instead of y(x);) has been around for quite a while.

I've been programming in C since 1985.  I was taught that structures were
like arrays in that the name of the thing was actually a pointer to the thing.
I have operated under this assumption ever since and have never had a problem!
This includes work done on:  Sun 2/150 and VAX 750 both running 4.2 BSD in
1985 and 1986, VAX 785 running Ultrix 2.? in 1986 and 1987, and a 386 running
Microport's SysV hack in 1988.  I don't know why I never noticed the 'real'
way to do it in any books, other than that I never thought I needed help
with passing pointers to structures and, hence, didn't pay much attention.
I haven't even been able to look this up in my two original C books (K&R and
a blue one by Kochan) because they are on loan at the moment.

When I started working on this Pyramid in January, I was told that it passes
structures differently.  Yes, I'm not the only one!  Two other C programmers
here have had a similar experience to me; one of whom started in C about
a year ago.  And its certainly not because New Zealand is so far from the
rest of the world, because one of us is from Britain and I'm American :-)

I just feel like I've entered the twilight zone.  Thanx for the responses,
both mail and news.  Can anyone explain why I've gotten away with this for
so long?

==============================================================================
Ken Spagnolo - Systems Programmer, Postmaster, Usenet Administrator, etc...
    Computer Centre, Massey University, Palmerston North, New Zealand
K.Spagnolo at massey.ac.nz     Phone: +64-63-69099 x8587     New Zealand = GMT+12
==============================================================================



More information about the Comp.sys.pyramid mailing list