Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: ;) <<== HEY DANN, THIS IS A SMILEY, SO I AM ONLY KIDDING AROUND!!!

Author: Dann Corbit

Date: 19:48:51 02/05/02

Go up one level in this thread


On February 05, 2002 at 22:19:13, Pham Minh Tri wrote:

>Just try if the title works ;)

It helps a lot, thanks.

>
>[snip]
>
>>And since he wants no loop at all, we can just remove the switch like this:
>>
>>foo[0] = bar[0];
>>foo[1] = bar[1];
>>foo[2] = bar[2];
>>foo[3] = bar[3];
>>foo[4] = bar[4];
>>foo[5] = bar[5];
>>foo[6] = bar[6];
>>foo[7] = bar[7];
>>foo[8] = bar[8];
>>foo[9] = bar[9];
>>...
>>foo[n] = bar[n];
>
>Oops, if n is a variable?

Again, not a problem.
Just write a new routine for every count from 0 to ULONG_MAX (or maybe
(size_t)-1 if you prefer) and we are done.  Then call the appropriate routine
when you need it.
Your days of worry over having to loop over a variable are in the past now.
Code storage now becomes more important, but disk is getting cheaper all the
time.
***************************************************************************
;-) <<== I trust you don't need any help.  This is in case I should happen to
read this again.
***************************************************************************



>>He already killed my lazy man trick be removing the struct wrapper as a
>>solution.
>>;-)



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.