"While ciklus" |a i sum| sum:=0. a:=#(2 3 1 4 5 6).i:=1. [ i < 5 ] whileTrue: [sum := sum + (a at: i). i := i + 1]. Transcript cr;cr; show: 'sum = ', sum asString; cr. "While2" [Dialog confirm: 'Stop?'] whileFalse: [Transcript cr; show: 'Continuing']. "Legnagyobb közös osztó keresése" | a b | a := 345. b := 230. [ a ~= b ] whileTrue: [ a < b ifTrue: [ b := b - a ] ifFalse: [ a := a - b ] ]. Transcript cr;cr; show: 'LNKO = ', a asString; cr. "Repeat - vegtelen ciklus" [ (Dialog confirm: 'Continue') ifFalse: [^self]. Transcript show: 'Continuing'] repeat. "Valahanyszoros ismetles" 5 timesRepeat: [Transcript cr; show: 'hello'] 1 to: 5 do: [ :index | Transcript cr; show: index printString] "Lepeskoz megadasa" 15 to: 1 by: –2 do: [ :index | Transcript cr; show: index printString].