Re: A[x][y][z]
- From: Flash Gordon <spam@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 30 Sep 2005 12:21:57 +0100
sterten@xxxxxxx wrote:
Provide context. I'm sure that one of two things is true: 1) You have already been given instructions on how to do this 2) You have been providing context.
In either case you have no excuse for not doing so now. There are plenty of posts on the group giving instructions, so if you don't know how then read yesterdays posts and you will find the instructions.
what I had in mind and meant with "pre-compiler" or "preprocessor" is a small utility which reads the C-"source" containing A[x,y] or int A[n] and converts it into another C-source-file where A[x,y] is converted into A[x][y] and int A[n]; into int A[n+1] and maybe some other things too.
This can't be so difficult to write and probably already exists somewhere ?!?
It may well not be difficult, but I don't believe there is any *good* reason for doing it for all the reasons Kieth and others have stated.
Some reasons are:
1) If you ran the code through such a utility twice it would not produce
an error but would *definitely* produce incorrect code.
e.g. int A[n] --> int A[n+1] --> int A[n+1+1]
2) No C programmer would find it easy to work with your original code
since it is written in something that is not quite C.
3) No non-C programmer would be able to work with your code since it
would be unlike any other language.
4) If you want a language that uses things like A[x,y] and allows arrays
to be indexed from something other than 0 there are plenty to choose
from.Since you have not addressed any of the reasons people have stated why what you are asking for is a bad idea we have absolutely no idea why you are continuing with this unless it is that you are a troll.
BTW, there are plenty of things that I wish were different in C, but I do what everyone else does and either use the language as is or use a different language, I don't try to make C look like something different.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
.
- References:
- A[x][y][z]
- From: sterten
- Re: A[x][y][z]
- From: Keith Thompson
- Re: A[x][y][z]
- From: Keith Thompson
- Re: A[x][y][z]
- From: sterten
- A[x][y][z]
- Prev by Date: Re: Universal (g)libc
- Next by Date: allocation alignment for global and local variables.
- Previous by thread: Re: A[x][y][z]
- Next by thread: Re: A[x][y][z]
- Index(es):
Relevant Pages
|