~efargaspro/+junk/codeblocks-16.01-release

« back to all changes in this revision

Viewing changes to src/sdk/resources/lexers/lexer_smalltalk.sample

  • Committer: damienlmoore at gmail
  • Date: 2016-02-02 02:43:22 UTC
  • Revision ID: damienlmoore@gmail.com-20160202024322-yql5qmtbwdyamdwd
Code::BlocksĀ 16.01

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
"bubble sort"
 
3
 
 
4
bubbleSort: cmpFun
 
5
        "Implementing Bubble sort with Smalltalk"
 
6
        | i j tmp funResult |
 
7
        i := self size.
 
8
        [i > 0]
 
9
                whileTrue: [j := 1.
 
10
                        [j <= i]
 
11
                                whileTrue: [funResult := cmpFun
 
12
                                                                value: (self at: i)
 
13
                                                                value: (self at: j).
 
14
                                        funResult
 
15
                                                ifTrue: [tmp := self at: i.
 
16
                                                        self
 
17
                                                                at: i
 
18
                                                                put: (self at: j).
 
19
                                                        self at: j put: tmp].
 
20
                                        j := j + 1].
 
21
                        i := i - 1]
 
22
 
 
23
missing comment sign "