[Info-vax] Dave Cutler, Prism, DEC, Microsoft, etc.
JF Mezei
jfmezei.spamnot at vaxination.ca
Thu Dec 17 15:15:37 EST 2009
Bob Koehler wrote:
> Sadly, ANSI changed that some number of years ago. ANSI now says
> that all three of those are the same pointer.
Interesting. When I moved from VAX-C to DEC-C not that long ago, I was
forced to change all &mystring to mystring in my programs.
This is something which I hated doing because to me, &mystring is far
better.
conside this:
char *mypointer, mystring[256] ;
status = myroutine(mypointer, &mystring) ;
You could clearly know that the value of mypointer is being passed,
while it is clear that a pointer to mystring is being passed.
if you have status = myroutine(mypointer, mystring); then it is ness
obvious and you would have to refer back to the definition of each
variable to make sure. (replace the variable name with "a" and "b" and
it really ins't obvious which one contans a pointer as value and which
one contians a string as value.
I am sure the ANSI people had some reason for preventing the use of
&mystring.
More information about the Info-vax
mailing list