[Freeciv-Dev] Re: (offtopic) C subscripts; was Re: Compiler-war
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, 25 Jan 2001, Reinier Post wrote:
> > This is required often, when doing pointer arithmetics and accessing
> > fields, which have already been processd (e.g. when using *(p++)) and
> > for any reason needing it again.
> >
> > But I prefer to use *(p-1) instead of p[-1], as this is much better style.
>
> I'm no better programmer than you are, but I don't think mixing pointers
> and subscripts is good style at all.
A matter of personal style I think. But usually I don't mix them up as
well.
So lets take another example. On Amiga there are some structures, which
have negative offset fields. And I still prefer to access them
*(seglist-1) instead of seglist[-1] :-)
Ciao
____ _ _ ____ _ _ _ _ ____
| | | | | | \ / | | | the cool Gremlin from Bischofswerda
| __ | ____| | \/ | | | WWW: http://home.pages.de/~stoecker/
| | | | | | | | PGP key available on www page.
|____| _|_ |____| _|_ _|_ |____| I hope AMIGA never ends to make fun!
- [Freeciv-Dev] Re: (offtopic) C subscripts; was Re: Compiler-warnings, David Pfitzner, 2001/01/24
- [Freeciv-Dev] Re: (offtopic) C subscripts; was Re: Compiler-warnings, Dirk Stoecker, 2001/01/25
- [Freeciv-Dev] Re: (offtopic) C subscripts; was Re: Compiler-warnings, Reinier Post, 2001/01/25
- [Freeciv-Dev] Re: (offtopic) C subscripts; was Re: Compiler-warnings,
Dirk Stoecker <=
- [Freeciv-Dev] Re: (offtopic) C subscripts; was Re: Compiler-warnings, Reinier Post, 2001/01/26
- [Freeciv-Dev] Re: (offtopic) C subscripts; was Re: Compiler-warnings, Gaute B Strokkenes, 2001/01/27
- [Freeciv-Dev] Re: (offtopic) C subscripts; was Re: Compiler-warnings, Raimar Falke, 2001/01/27
- [Freeciv-Dev] Re: (offtopic) C subscripts; was Re: Compiler-warnings, Gaute B Strokkenes, 2001/01/27
- [Freeciv-Dev] Re: (offtopic) C subscripts; was Re: Compiler-warnings, Raimar Falke, 2001/01/27
- [Freeciv-Dev] Re: (offtopic) C subscripts; was Re: Compiler-warnings, Gaute B Strokkenes, 2001/01/27
[Freeciv-Dev] Re: (offtopic) C subscripts; was Re: Compiler-warnings, Gaute B Strokkenes, 2001/01/25
|
|