summary refs log tree commit diff stats
path: root/examples
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2015-04-14 21:01:36 +0200
committerhut <hut@lepus.uberspace.de>2015-04-14 21:01:36 +0200
commit668b2a1dfcd1bfe6437aa65ffea75e7f82feb9fe (patch)
tree4179b6cabcd8d326e5091489f2f6067428999038 /examples
parentaf3d83c6c45d6d59a30a48360dea81ebe1a61690 (diff)
downloadranger-668b2a1dfcd1bfe6437aa65ffea75e7f82feb9fe.tar.gz
CHANGELOG: typo
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions
> 2016-09-17 00:31:55 -0700 3379' href='/akkartik/mu/commit/screen.mu?h=main&id=08f4628e8b858120fe3547d8e5431d9abfe46bf8'>08f4628e ^
cd0577ae ^
192d59d3 ^
bc643692 ^


08f4628e ^

bc643692 ^











290fe117 ^
a63ebc92 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
                                                              
 

                                                                            
          
              
                                            
                      
                                           
                                                  


                                       

                         











                                       
               
 
# example program: managing the display using 'screen' objects

# The zero screen below means 'use the real screen'. Tests can also use fake
# screens.
def main [
  open-console
  clear-screen 0/screen  # non-scrolling app
  10:char <- copy 97/a
  print 0/screen, 10:char/a, 1/red, 2/green
  1:num/raw, 2:num/raw <- cursor-position 0/screen
  wait-for-event 0/console
  clear-screen 0/screen
  move-cursor 0/screen, 0/row, 4/column
  10:char <- copy 98/b
  print 0/screen, 10:char
  wait-for-event 0/console
  move-cursor 0/screen, 0/row, 0/column
  clear-line 0/screen
  wait-for-event 0/console
  cursor-down 0/screen
  wait-for-event 0/console
  cursor-right 0/screen
  wait-for-event 0/console
  cursor-left 0/screen
  wait-for-event 0/console
  cursor-up 0/screen
  wait-for-event 0/console
  close-console
]