about summary refs log blame commit diff stats
path: root/console.mu
blob: cc81c2323dbb557f1323ea7f363d78e453160a04 (plain) (tree)
lass='alt'>
16



                                                                 
          
             
              
   
                                                 
                   
                                          

        
               
                      
 
# example program: reading events from keyboard or mouse
#
# Keeps printing 'a' until you press a key or click on the mouse.

def main [
  local-scope
  open-console
  {
    e:event, found?:bool <- check-for-interaction
    break-if found?
    print-character-to-display 97, 7/white
    loop
  }
  close-console
  $print e, 10/newline
]