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 | SEEK

Edit History

SEEK

SEEK #fileN, pos

Home > Reference > File

Sets file position to pos for the next read/write for file with the ID #fileN. The file position starts with 0.

Example

' create a file
open "testseek.txt" for output as #1
print #1, "abcdefghijk"
close #1


' open file
open "testseek.txt" for input as #1
seek #1, 4                              ' file position set to 4
c = input(1,1)                          ' read one character from file
print c                                 ' Output: e
close #1
Code samples using SEEK
startrek.bas   startrek.bas   tracklog.bas   treason.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 Wed, 2 Aug 2023 09:55: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.