OWBasic for Pocketviewer

Home INTRO Group FILEBUFFER Alphabetical Index

Example for Reading in Filebuffer

The example shows the usage of FBSTRING to read strings from a text file buffer:


! Read the first memo in category 2
fp=-1
FILENEXT 3,2,fp: ! Set fp to first record
FILEREAD 3,2,fp: ! Read record (=memo)
FBINIT:          ! Set internal pointer to begin of buffer
$m
  s$=FBSTRING$(rc): ! Read one line
  if rc>0 goto mend: ! Succes ?
  ? s$ :            ! Output string
  goto m :          ! repeat
$mend


Home INTRO Group FILEBUFFER Alphabetical Index