Messages from list : cormas@cirad.fr

Choose a topic among the following archives :

Re: change the patch state

New Message Reply Date view Thread view Subject view Author view

Subject: Re: change the patch state
From: Pierre (bommel@cirad.fr)
Date: Wed May 23 2007 - 16:24:40 CEST

Hi Chau Duc Phu,

To change the state of the cells every 4 time steps, you can add the following line in the main control step :

step: t
"main step"
    ...
    t \\4 = 0 ifTrue: [self theCells do:[:cell | cell step]].      "\\ answers t modulo 4, for example : 10\\4 -> 2 ;   8\\4 -> 0  "
    ...

Help its help. Best regards,

    Pierre

Chau Duc Phu a écrit :

Hi all!

I am a begin programmer of Cormas tool and Smalltalk. I want to change the patch state after 4 steps. But I don’t know how to do it.

I essayed to do such as:

- I wrote a condition statement according to step value "t" of program but I don't know how to take this value.

- Example:

If (t > 4)

      < statement >

Endif

t is the step value in function step of "control" protocol.

Could you give me the detailed guide of this problem.

Great thanks for your help!

------------------

Chau Duc Phu

Etudiant P12 - Institut de la Francophonie pour l'Informatique (IFI)

Ruelle 42, Ta Quang Buu, Hanoi, Vietnam

Tel : 0905.630.631


No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.7.6/815 - Release Date: 22/5/2007 15:49

-- 
--------------------------------
Pierre Bommel - CIRAD - UR Green
Universidade de Brasília - CDS
SHIS QI 26, Conj. 15, Cs 18
71670-150
Brasília DF
tel : (00 55 61) 3367 3405
http://www.cirad.fr/ur/green
-------------------------------- 

New Message Reply Date view Thread view Subject view Author view
 

Back to home