D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re[2]: [LUG] C array question



On Thursday 25 April 2002 1:04 pm, MATTHEW BROWNING wrote:

Date: Today 1:04:40 pm

Hmm, is your clock set wrong? I just freaked out when i saw that time, though 
i'd missed something rather important :p



At my end it looks like this:

From:             "MATTHEW BROWNING" <m.browning@xxxxxxxxxxxxxx>
Organization:     University of Plymouth
To:               list@xxxxxxxxxxxx
Date sent:        Thu, 25 Apr 2002 12:02:53 GMT
Subject:          Re: [LUG] C array question
Send reply to:    list@xxxxxxxxxxxx

...and my clock appears to be okay.




Or maybe you live aren't really at plymouth uni ?;)


The nature of your question is metaphysical?  Certainly in some 
senses, rather a lot of the time, I am not here at all.  Personnel, 
however, seem satisfied enough to pay me.

To return to the question, to which I note there have been a couple 
more suggestions:

Having spent lunchtime ambling around with my dog it seems reasonable 
to state that, although the original question sought to avoid the use 
of loops, if an assignment is to be made a number of times then that 
is, inherently, going to be some sort of a loop - even if you 
explicitly code each assignment separately.

The only issue is who wrote the loop?

If you wanted to go really mad, you could, I suppose, reproduce the 
syntax of the Fortran assignment using preprocessor directives, but 
that is not really in the spirit of C.

As has been pointed out here before, if you are spending more time 
looking for library function x than it would take to knock up the 
same functionality yourself, you are doing it wrong.

Take the path of least resistance:{
       for(x=0;x<ITERATIONS;x++) {
               array[x]=SECOND_ARGUMENT;
               }

Yeah!

MB

--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


Lynx friendly