CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: input output

  1. #1
    Guest

    input output

    Does anyone know how to minipulate files? I need to be able to open a file find a word then do something with that word(delete,replace) after that i want to update the file(text file only) I'm trying not to use a database
    please somebody help me!!!!


  2. #2
    Join Date
    Oct 1999
    Location
    Stuttgart, Germany
    Posts
    80

    Re: input output

    Hey,

    with

    open "file.dat" for input as #1

    you can open a file! Then type

    input #1, strvar

    , and the contentof the file will be copied in a string named strvar. Now you can edit this variable with a lot of functions (f.e. mid$, left$...). Sorry, but how to search to some words I don't know!

    Okay, cu!

    AScomp


  3. #3
    Join Date
    Oct 1999
    Location
    Stuttgart, Germany
    Posts
    80

    Re: input output

    Hey,

    if you want to save the variables, you have to write:

    open "file.dat" for output as #1
    print #1, strvar
    close #1

    , and strvar is the variable you want to save (it can be all types of variables). Okay, hope that it helps you!

    AScomp


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

Featured