Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
5
Task/Loops-While/Smalltalk/loops-while-1.st
Normal file
5
Task/Loops-While/Smalltalk/loops-while-1.st
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[s atEnd] whileFalse: [s next. ...].
|
||||
[foo notNil] whileTrue: [s next. ...].
|
||||
[...] doWhile: [ ... someBooleanExpression ].
|
||||
[...] doUntil: [ ... someBooleanExpression ].
|
||||
[:exit | ... cold ifTrue:[exit value]. ...] loopWithExit
|
||||
4
Task/Loops-While/Smalltalk/loops-while-2.st
Normal file
4
Task/Loops-While/Smalltalk/loops-while-2.st
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
number := 1024.
|
||||
[ number > 0 ] whileTrue:
|
||||
[ Transcript print: number; nl.
|
||||
number := number // 2 ]
|
||||
4
Task/Loops-While/Smalltalk/loops-while-3.st
Normal file
4
Task/Loops-While/Smalltalk/loops-while-3.st
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
number := 1024.
|
||||
[ number <= 0 ] whileFalse:
|
||||
[ Transcript print: number; nl.
|
||||
number := number // 2 ]
|
||||
Loading…
Add table
Add a link
Reference in a new issue