John Kelsey said:
For example, one of my "C" programs has
struct
{
double L;
double M;
double S;
} LengthArray[] = {
{ 1.267004226, 49.988884080, 0.053112191}, // 1
{ 0.511237696, 52.695975300, 0.048692684}, // 2
{ -0.452244460, 56.628428550, 0.044116830}, // 3
This is some statistical data (there are 76 records per array) and I have
Length, Weight, and Circumference arrays.
I typically am targeting some low "horsepower" handheld devices.
Even in C, I could run time initialize my arrays but I didn't for at
least a
couple of reasons...
1) Performance, why waste runtime cycles building an array when it could
be
pre-built by the compiler
2) Run time building meant that I carried two copies of my data in the
"execution footprint". One copy in code segment and the other copy in
the
data segment.
In both of these cases, I'd expect the time and memory taken to be
really pretty tiny. You'll be wasting a few K and a couple of
milliseconds (once), even on a handheld device. These days, that's not
likely to be a significant problem.
I understand that this really doesn't present a challenge to a modern
device, especially in a desktop environment, it was just a style I
have/had.
Sure.
I don't understand C# the way I do C. Things that used to be important,
no
longer seem to matter as much.
Indeed. However, the things which were a real pain in C are much easier
in C# and .NET. Modern languages tend to value the time of the
developer over the time of the processor, on the grounds that it's
generally a lot more expensive
I've appreciated all of the responses and I'm certain I'll ask more "old
fashioned" questions as I learn.
Goodo. Do keep 'em coming.