-

Please use this Board for QBasic related requests ( file research, programming, etc.)

Moderators:Administrator, Global Moderator

Post Reply
Thunderhawk66
-

Post by Thunderhawk66 » Mon Nov 25, 2002 6:46 am

-
Last edited by Thunderhawk66 on Tue Jul 29, 2014 7:55 am, edited 1 time in total.

User avatar
frankiebaby
Global Moderator
Posts:95
Joined:Tue Apr 30, 2002 1:38 am
Location:Pennsylvania
Contact:

Re: Loading text files

Post by frankiebaby » Mon Nov 25, 2002 3:21 pm

Ok well, the easiest way, if you only want to display lines on screen, is to use

OPEN "file.fle" FOR INPUT AS #1
FOR
line input #1, TEXT$
PRINT TEXT$
NEXT


you can also try input# for space or comma delimited values.

in the online help:

LINE INPUT # - a file I/O statement that reads an entire line without delimiters from a sequential file to a string variable

Syntax
LINE INPUT #filenumber,stringvariable
  _ filenumber is the number of an open sequential file
  _ stringvariable will hold all characters from the
       sequential file from the current position
       in the file up to, but not including, the
     next carriage-return-line-feed sequence. No
      carriage-return-line-feed
     sequences are ever input.

Post Reply