Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: Corrected code
Home

[Freeciv-Dev] Re: Corrected code

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Corrected code
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 23 Sep 2001 13:55:59 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Sun, Sep 23, 2001 at 04:30:31AM -0700, Raahul Kumar wrote:
> Thanks for all the feedback. Let me know if the problems with my
> email continually recur, if so I will send email from a different
> provider. I have attached the corrected code both as attachment and
> as inline text.

The inline text is broken. The attachment is fine. You may also sent
normal text as an attachment.

Content-Description: Corrected.txt
> 
>   /*
>    * Change surplus scientists to entertainers
>    */

> extra_scientists = (pcity->ppl_scientist - result->scientists);
> if (extra_scientists > 0)
>   for (i = 0; i < extra_scientists; i++) {

What about replacing the three lines above with:
>   for (i = 0; i < (pcity->ppl_scientist - result->scientists); i++) {

No extra variable. No extra if.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "On the eigth day, God started debugging"


[Prev in Thread] Current Thread [Next in Thread]