2 Little Smalltalk, Version 5
4 Copyright (C) 1987-2005 by Timothy A. Budd
5 Copyright (C) 2007 by Charles R. Childers
6 Copyright (C) 2005-2007 by Danny Reinhold
7 Copyright (C) 2010 by Ketmar // Vampire Avalon
9 ============================================================================
10 This license applies to the virtual machine and to the initial image of
11 the Little Smalltalk system and to all files in the Little Smalltalk
12 packages except the files explicitly licensed with another license(s).
13 ============================================================================
14 Permission is hereby granted, free of charge, to any person obtaining a copy
15 of this software and associated documentation files (the 'Software'), to deal
16 in the Software without restriction, including without limitation the rights
17 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18 copies of the Software, and to permit persons to whom the Software is
19 furnished to do so, subject to the following conditions:
21 The above copyright notice and this permission notice shall be included in
22 all copies or substantial portions of the Software.
24 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 DEALINGS IN THE SOFTWARE.
37 Object subclass: SLangTest [
42 s writeString: 'Enter ctrl-g to quit' at: #(1 0).
43 s writeString: (s screenRows asString + ',' + s screenCols asString)
46 s drawBox: #(7 5 10 15).
48 s gotoRow: 7 col: 20. s writeChar: $^ value.
52 s writeChar: $a value].
54 s gotoRow: 16 col: 20. s writeChar: $v value.
57 [ s flushInput. k <- s getKey. 7 = k ] whileFalse:
58 [s writeString: ('you pressed ' + k asString + ' ') at: #(30 0).
68 Eval [ SLangTest test ]