This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/share/CodeBlocks/lexers/lexer_smalltalk.sample

24 lines
442 B
Plaintext

"bubble sort"
bubbleSort: cmpFun
"Implementing Bubble sort with Smalltalk"
| i j tmp funResult |
i := self size.
[i > 0]
whileTrue: [j := 1.
[j <= i]
whileTrue: [funResult := cmpFun
value: (self at: i)
value: (self at: j).
funResult
ifTrue: [tmp := self at: i.
self
at: i
put: (self at: j).
self at: j put: tmp].
j := j + 1].
i := i - 1]
missing comment sign "