[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strange behaviours passing parameters
From: |
Fabio Mascelloni |
Subject: |
Re: Strange behaviours passing parameters |
Date: |
Mon, 08 Mar 1999 18:54:13 +0100 |
"Marcus G. Daniels" wrote:
>
> Without seeing the source code of setChunk:From:To:, I can only
> guess that misleading information is due to optimization.
>
Thank you,you've just led me right where the error was.
This was the wrong implementation of "setChunk"
- setChunk: geno_chunk From:(unsigned) startPoint To:(unsigned) endPoint
{
unsigned idx;
for (idx=startPoint; idx <= endPoint ;idx++)
*(selfGenotype+idx)=*(geno_chunk+idx);
return self;
}
This is the right one (I hope):
-setChunk: geno_chunk From:(unsigned) startPoint To:(unsigned) endPoint
{
unsigned idx,chunkLength;
chunkLength=(endPoint-startPoint)+1;
for (idx=0; idx <chunkLength ;idx++)
*(selfGenotype+startPoint+idx)=*(geno_chunk+idx);
return self;
}
Now it's all right!
Fabio.
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.