Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!murtoa.cs.mu.oz.au!munnari.oz.au!comp.vuw.ac.nz!massey!KSpagnol From: KSpagnol@massey.ac.nz (Ken Spagnolo) Newsgroups: comp.sys.pyramid Subject: More on Pyramid's not so non-standard C compiler Message-ID: <239@massey.ac.nz> Date: 4 Aug 89 05:57:09 GMT Reply-To: K.Spagnolo@massey.ac.nz (Ken Spagnolo) Organization: Massey University, Palmerston North, New Zealand Lines: 32 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@massey.ac.nz Phone: +64-63-69099 x8587 New Zealand = GMT+12 ==============================================================================