object 86844ff65a71d585fbe4c40afd6eeed1c2d463bd

0 views
Skip to first unread message

letha...@gmail.com

unread,
May 24, 2009, 11:19:14 AM5/24/09
to syx-c...@googlegroups.com
Branch: object
commit 86844ff65a71d585fbe4c40afd6eeed1c2d463bd
Author: Luca Bruno <letha...@gmail.com>
Date: Sun May 24 16:27:21 2009 +0200

Flush stdout on menu example

:100755 100755 078b89d... 47868ca... M examples/console/menu.st

diff --git a/examples/console/menu.st b/examples/console/menu.st
index 078b89d..47868ca 100755
--- a/examples/console/menu.st
+++ b/examples/console/menu.st
@@ -24,10 +24,13 @@ choice := nil.
[$2] -> [
| n1 n2 op |
'First number: ' display.
+ stdout flush.
n1 := Number readFrom: stdin.
'Operation (+, /, -, *, <, >, =, ...): ' display.
+ stdout flush.
op := ((stdin next: 1024) copyWithout: Character nl) asSymbol.
'Second number: ' display.
+ stdout flush.
n2 := Number readFrom: stdin.
('Result: ', (n1 perform: op with: n2) displayString) displayNl ].

Reply all
Reply to author
Forward
0 new messages