Results 1 to 4 of 4

Thread: retrieve a line after using open file for input as??

  1. #1

    Thread Starter
    Fanatic Member rudvs2's Avatar
    Join Date
    Mar 2001
    Location
    NZ
    Posts
    935

    retrieve a line after using open file for input as??

    Hey every one my help is not installed on the pc im using at the mo and i am just trying to remember the syntax for using lineinput with a file opened for input

    if someone could post an example or the correct syntax it would be great

    thanks everyone

  2. #2
    matrixau
    Guest
    try this

    Open "location" For (Input/output) As #filenumber
    Line Input #FileNumber, varname
    Write #FileNumber, [outputlist]
    Input #FileNumber, varname

  3. #3
    Addicted Member Diab's Avatar
    Join Date
    Apr 2001
    Posts
    185
    [CODE]
    Open FileName For Input As #FileNumber
    'Open the file

    Do While Not EOF(FileNumber)
    'Loop through line by line until
    'The End Of File is reached
    Input #FileNumber, StrFilesText
    Loop

  4. #4
    Matthew Gates
    Guest
    Originally posted by Diab
    [CODE]
    Open FileName For Input As #FileNumber
    'Open the file

    Do While Not EOF(FileNumber)
    'Loop through line by line until
    'The End Of File is reached
    Input #FileNumber, StrFilesText
    Loop

    You should use Line Input instead of just Input.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width