Reply-To: "Kevin Aylward"
From: "Kevin Aylward"
References: <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org>
Subject: Re: To C or not to C
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-Inktomi-Trace: public1-pete2-5-cust126.pete.broadband.ntl.com 1041872672 17398 22.214.171.124 (6 Jan 2003 17:04:32 GMT)
Date: Mon, 6 Jan 2003 17:04:33 -0000
NNTP-Posting-Date: Mon, 06 Jan 2003 17:04:33 GMT
> email@example.com (Nico Coesel) wrote:
>> Hate is a big word, but just look at this code and how it compiles on
>> the Dunfield 8051 compiler and SDCC:
>> //copy from program memory to data
>> strcpy_r(unsigned char o, code unsigned char i)
>> unsigned char a;
>> while (i[a]!= 0)
But if you wanted this to run faster, you would not do it this way in c.
You would reorganise it, because the compiler has to multiply by a. e.g.
while (*pi != 0)
ignoring the possibility of merging the ++'s for now.
Just about every that I am scanning CArray class data in SuperSpice, I
set up pointers to pointers. Using C/C++ constructs like x=name[a][b],
when you are indexing through is only done for convenience. There is
nothing to force youi to do this.
SuperSpice, a very affordable Mixed-Mode
Windows Simulator with Schematic Capture,
Waveform Display, FFT's and Filter Design.