🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #6869

Re: NOT Educating FORTRAN programmers to use C

#6869
From: Sean Fagan
Date: Mon, 05 Mar 1990 03:31
27 lines
1475 bytes
In article <1895@skye.ed.ac.uk> jeff@aiai.UUCP (Jeff Dalton) writes:
>In article <14203@lambda.UUCP> jlg@lambda.UUCP (Jim Giles) writes:
>>You just made it.  In C there is _NO_DIFFERENCE_ between a pointer and
>>an array. 
>
>Can't assign to something declared as an array.

Not again?!  In C, there is no difference twixt and 'tween the two, provided
it gets passed as an argument to a function.  With, however:

	int a[100];
	int b[100];
	void foo(int x, int y, int z) {
		/* do whatever with a and b */
	}

the compiler does *not* have to worry about aliasing.  If a function is
called, it *does* have to worry about a and b changing (unless they are
static, and no pointers were passed out, which a compiler *can* be aware of
fairly easily).  Voila:  no aliasing problems.

With pointers, however, it is a bit different.

-- 
Sean Eric Fagan  | "Time has little to do with infinity and jelly donuts."
seanf@sco.COM    |    -- Thomas Magnum (Tom Selleck), _Magnum, P.I._
(408) 458-1422   | Any opinions expressed are my own, not my employers'.
Technical Details
Message-ID: <5055@scolex.sco.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!sco!seanf
References: <17036@megaron.cs.arizona.edu> <14203@lambda.UUCP> <1895@skye.ed.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!sco!seanf
From: seanf@sco.COM (Sean Fagan)
Newsgroups: comp.lang.misc
Subject: Re: NOT Educating FORTRAN programmers to use C
Message-ID: <5055@scolex.sco.COM>
Date: 5 Mar 90 03:31:36 GMT
References: <17036@megaron.cs.arizona.edu> <14203@lambda.UUCP> <1895@skye.ed.ac.uk>
Reply-To: seanf@sco.COM (Sean Fagan)
Organization: The Santa Cruz Operation, Inc.
Lines: 27