GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Download
  • News
  • Community
  • Resources
  • Language Reference
  • SmallBASIC Manual

This view

  • Original page
  • New address

GeezerVison is showing smallbasic.github.io — SmallBASIC | CLOSE

Edit History

CLOSE

CLOSE #fileN

Home > Reference > File

Close a file or device with file-handle #fileN.

See OPEN for more information on how to read or write files.

Example

' create a text file
open "MyDemoFile.txt" for output as #1

for i = 1 to 10
    print #1, i 
next

close #1

' open text file and print content line by line
open "MyDemoFile.txt" for input as #1

while(!eof(1))   ' eof works only without #
    input #1, c
    print c
wend

close #1
Code samples using CLOSE
000 hello.bas   002 numeric variables.bas   3d_palmx.bas   4tune.bas   7gables.bas   agendus.bas   ai.bas   anomail.bas   base64.bas   betrayal: crows ii.bas   blackjack.bas   BlackJack.bas   cgi_counter.bas   chess.bas   ciretose.bas   coordplot.bas   counter.bas   demanda.bas   dmsareaplot.bas   dmsareareadmd.bas   dogstar5.bas   duckduckgo.bas   esoteric.bas   fiftyfifty v2.bas   filemanager.bas   form demo.bas   g2 Life.bas   g3 Life.bas   g4 Life.bas  
File
ACCESS   BGETC   BLOAD   BPUTC   BSAVE   CHDIR   CHMOD   CLOSE   COPY   DIRWALK   EOF   EXIST   FILES   FREEFILE   INPUT   INPUT   KILL   LOCK   LOF   MKDIR   OPEN   READ   RENAME   RMDIR   SEEK   SEEK   TLOAD   TSAVE   WRITE  
This page was last edited on Thu, 21 Sep 2023 13:40:33 +0200 | Markdown processed with pandoc 3.1.12.1
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.