#585 was: Quick update

Robert Helling helling at atdotde.de
Thu Jul 3 07:36:15 PDT 2014


On 03.07.2014, at 15:58, Dirk Hohndel <dirk at hohndel.org> wrote:

>> 1) A minor one: the “going back in time” is done as a loop with 
>> 
>> 	while (i && —i)
>> 
>> where i is the index in the dive list. Here, it seems to me i==0 is a perfectly fine value, it is the first entry in the dive list. So the condition should rather be
>> 
>> 	while (i >= 0 && --i >= 0)
> 
> Yes, but that's equivalent to what we have.
> while (i && --i) allows i = 1 which gets decremented to 0 before the loop
> starts.
> 
>> Could somebody please confirm/refute this?
> 
> refute :-)

Ahm. I thought the difference is whether the loop runs with the value i==0 (which is a perfectly fine number for an index of the dive list). Do you still hold to your refutation?

Best
Robert






-- 
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling     Elite Master Course Theoretical and Mathematical Physics
                      Scientific Coordinator
                      Ludwig Maximilians Universitaet Muenchen, Dept. Physik
                      Phone: +49 89 2180-4523  Theresienstr. 39, rm. B339
                      http://www.atdotde.de

Enhance your privacy, use cryptography! My PGP keys have fingerprints
A9D1 A01D 13A5 31FA 6515  BB44 0820 367C 36BC 0C1D    and
DCED 37B6 251C 7861 270D  5613 95C7 9D32 9A8D 9B8F




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20140703/50874881/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20140703/50874881/attachment.sig>


More information about the subsurface mailing list