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: Mehdi Saqalli (msqalli@yahoo.com)
Date: Wed May 23 2007 - 15:59:10 CEST

hello M. Phu
   
  a good way is the following. give a title to your function. example: doThat. because it is temporally based, the function wshould be :
   
  doThat:t
   
  "now the statement. the choice should always appear first, like in UML. you ask the question then you answer if things are true or false. writing in commas in cormas-smalltalk does not have any effects. it is a good way to add comments around your function to not forget why you wrote such things."
   
  doThat:t
  t > 4
    ifTrue: [ <statement in case of true>]
    ifFalse: [<statement in case of false>]
   
  hope things go on
   mehdi
   

Chau Duc Phu <cdphu@ifi.edu.vn> 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

             
---------------------------------
 Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail

New Message Reply Date view Thread view Subject view Author view
 

Back to home