examples: minor optimization of calculator (#6367)
parent
a984f9cf97
commit
11f10fdce2
|
@ -117,8 +117,7 @@ fn main() {
|
||||||
mut expr_count := 0
|
mut expr_count := 0
|
||||||
for {
|
for {
|
||||||
expr_count++
|
expr_count++
|
||||||
print('[$expr_count] ')
|
expr := os.input('[$expr_count] ').trim_space()
|
||||||
expr := os.get_line().trim_space()
|
|
||||||
if expr in ['exit', 'EXIT'] {
|
if expr in ['exit', 'EXIT'] {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue