File writing

Discussion in 'Computer Science & Culture' started by Spectrum, Jan 2, 2008.

Thread Status:
Not open for further replies.
  1. Spectrum Registered Senior Member

    Messages:
    459
    I need help writing to a file that is running. I am programming in QBasic but any advice would be welcome (preferably debug for windows (which I understand is an assembler)). My programs are as follows:

    ...or...

    The programs above do write to the file but I have to close down the program to see what has been written. I want the data to be written to the file, not simply to memory.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Stryder Keeper of "good" ideas. Valued Senior Member

    Messages:
    13,105
    According to my quickreference (since I don't program in QBasic) you are missing something out from the initial file open:
    Code:
    OPEN [THISFILENAME$] for RANDOM AS #1 LEN = LEN([i]RecordVariable[/i])
    
    I couldn't tell you if this is helpful at all, from what I can work out, using the RANDOM file access allows both Read and Write at the same time, you could try writing to a file using APPEND or OUTPUT to see whether or not your syntax is correct. (That's what I would try anyhow)

    The only other possibility is that you are using the #1 for more than one file access at a time and this could cause conflicts on closing.
     
  4. Google AdSense Guest Advertisement



    to hide all adverts.
  5. Spectrum Registered Senior Member

    Messages:
    459
    Stryder, thanks for your wise reply. However I get the same result when I use
     
  6. Google AdSense Guest Advertisement



    to hide all adverts.
Thread Status:
Not open for further replies.

Share This Page