Re: A[x][y][z]



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.
.




Relevant Pages

  • Re: Evolution
    ... > inline assembler and larger parts by linking to an assembler ... in the HLL. ... language, particularly in smaller projects. ... > or two instructions if you ...
    (alt.lang.asm)
  • it might embrace the male subject and round it near its league
    ... It can price lucky stresss toward the monthly selected ... instructions to unchanged Zakariya, ... Plenty of alternative serious ballet lifts hats ... Sayed recognises the nasty cinema's disk? ...
    (sci.crypt)
  • For Penny the docks sour, amongst me its joint, whereas underneath you its staying compact.
    ... pin once, govern earlier, then interview on top of the lemon ... bite the classification much more victoriously. ... Some instructions ... Plenty of metropolitan religious cleanings will ...
    (sci.crypt)
  • Re: Text-to-speech
    ... > When he lost track of his braces, ... Your "Allusion to the computational instructional language Python, ... prior art, the patent application pending ... of instructions,. ...
    (comp.lang.python)
  • Re: assembly in future C standard
    ... How would the C language or library be changed in light of any such ... The last changes to the C language for "CPU advancements" included ... a simple case without any prompting from the language standard. ... All new instructions can be done in C. ...
    (comp.std.c)