Liberty BASIC Help Online

This command is used to close files and devices.  This is the last step of a file "read" and/or "write" operation, and it is also used to close windows or DLLs that have been opened.  When execution of a program is complete, if there are any files or devices left open, Liberty BASIC displays a dialog explaining that it was necessary to close the opened files or devices.  This is designed as an aid so that the programmer can correct the problem.  If for some reason the programmer chooses to terminate the program early (this is done by closing the program's main window before the program finishes), then Liberty BASIC will close any open files or devices without posting a notice to that effect.
  open "Graphic" for graphics as #gWin  ' open a graphics window
  print #gWin, "home"                   ' center the pen
  print #gWin, "down"                   ' put the pen down
  for index = 1 to 100                  ' loop 100 times
    print #gWin, "go "; index           ' move the pen foreward
    print #gWin, "turn 63"              ' turn 63 degrees
  next index                   
  input "Press 'Return'."; r$           ' this appears in main window
  close #gWin                           ' close graphic window

Copyright (C) 2003 Shoptalk Systems
Liberty BASIC -