Oct. 23, 2010
12:50 p.m.
Hello, I use Pharo 1.1 . I want to add a new element in an array that have a part of nil element. I want to add this new element on the first nil case. I produce this code |test isFact| test := Array new:5. isFact := False. test doWithIndex:[ :each :i | ((each isNil) & (isFact = False)) ifTrue:[ test at:i put:'plain'; isFact := True ] ]. test. But it doesn't function because they are two instruction in the ifTrue bolck. So my question is : "How can i put two instructions in an ifTrue block?" Thanks, -- Simon De Baets, Etudiant en MA1 informatique à l'ULB